10

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

sikaili99
  • 532
  • 6
  • 14

2 Answers2

13

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

python3 -m pip install dnspython==2.2.1

The problem should disappear

3

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

otterrisk
  • 349
  • 3
  • 8