Question: I would like to take provided `enum` list and convert it to mine list. I am getting a list from a service Type and then I would like to convert it to mine `FieldTyp` via `DocumentFieldTypeConverter()`

However, this dent work because `enum` is not valid at this point `dic.Add(i, Enum.GetName(rgl, FieldType));`I am trying this for the first time so apologies if this is complete nonsense. Prior to this I have used just switch control but I thought there could be something better

```cs
class Program {
  static void Main(string[] args) {
    var x = new Type().DocumentFieldTypeConverter();
    foreach(var kvp in x) {
      Console.WriteLine($ "{kvp.Key}:   {kvp.Value}");
    }

    Console.ReadLine();
  }
}

public static class EnumExtension {
  public static Dictionary < int,
  FieldType > DocumentFieldTypeConverter(this Type rglFieldType) {
    var dic = new Dictionary < int,
    FieldType > ();
    var rgl = type.GetType();
    foreach(int i in Enum.GetValues(rgl)) {
      dic.Add(i, Enum.GetName(rgl, FieldType));
    }

    return dic;

  }
}

public enum FieldType {
  Document_Class_Code,
  Document,
  Document_Number,
  DocumentType,
  Passport_Number,
  Invitation_Number,
}

public enum Type {
  Document_Class_Code,
  Document,
  Document_Number,
  DocumentType,
  Passport_Number,
  Invitation_Number,

}

```

Answer: 
Based on the traceback you have found this issue:

[Selenium 3 is incompatible with Python 3.9](https://github.com/SeleniumHQ/selenium/issues/8762)
[![enter image description here](https://i.stack.imgur.com/NxYsi.png)](https://i.stack.imgur.com/NxYsi.png)

This is the fix for the issue: [DeprecationWarning of base64.encodestring()](https://github.com/SeleniumHQ/selenium/pull/7446/files).
[![enter image description here](https://i.stack.imgur.com/1T1xB.png)](https://i.stack.imgur.com/1T1xB.png)

They won't back port this fix:

> 
> Thanks for the issue. We won't be releasing another version 3 as we're
> heading to finishing off Selenium 4. It is a drop in replacement to
> use Selenium 4.0.0.a5 so should work the same. There should not be any
> breaking changes.
> 
> 
> 

1. So you could upgrade selenium to Selenium 4.0.0.a5 or
2. Downgrade Python to 3.7 for example. I suppose locally you do not run 3.9.
We were running into this issue as well, but going back to an older version of Python was not an option due to incompatibilities with other libraries. If you find yourself in the same spot, you can re-create the alias like so:

```
import base64
base64.encodestring = base64.encodebytes

```

In whatever your entry-point is.