Usually, the error module x has no attribute y
means that:
- Your working directory contains a
x
file, which collides with python’sx
module - You are running a python script from a directory (thereby making it your current working directory) where file
x
collides with python’sx
module
In this case, I have a selectors.py
file in the same folder as the script I’m running, and therefore, when python wants to import its own selectors
module, it gets mine, and fails.
So, either:
- Rename your own file
- Use
-m
to run script as a module - Move the script to another directory