Eventlet + DNS Python Attribute Error: module "dns.rdtypes" has no attribute ANY

5.9k Views Asked by At

I know that someone will face this problem. I had this problem today, but I could fix it promptly, and I want to share my solution:

Problem:

from flask_socketio import SocketIO

You will receive an output error with something like:

Attribute Error: module "dns.rdtypes" has no attribute ANY

This only happens if you have installed eventlet, because it install dnspython with it.

The solution is simple, just reinstall dnspython for previous realease:

python3 -m pip install dnspython==2.2.1

The problem should disappear

2

There are 2 best solutions below

0
On

The solution is simple, just reinstall dnspython for previous realease:

python3 -m pip install dnspython==2.2.1

The problem should disappear

0
On

I suggest taking the opposite route, i.e. upgrading eventlet (to 0.33.3 at the time of this writing) rather than downgrading dnspython.