Other possible source of error I have seen:
Executing the statements from interactive python works, however, when trying to run as a script, the same circular import error can happen if the script file was named token.py
, i.e.,
python token.py
will cause the import to fail. Rename your custom module.