AttributeError: ‘module’ object has no attribute

You have mutual top-level imports, which is almost always a bad idea. If you really must have mutual imports in Python, the way to do it is to import them within a function: Now can safely do import b without causing problems. (At first glance it might appear that cause_a_to_do_something() would be hugely inefficient because it does an import every … Read more

Why Python 3.6.1 throws AttributeError: module ‘enum’ has no attribute ‘IntFlag’?

It’s because your enum is not the standard library enum module. You probably have the package enum34 installed. One way check if this is the case is to inspect the property enum.__file__ Since python 3.6 the enum34 library is no longer compatible with the standard library. The library is also unnecessary, so you can simply uninstall it. If you need the code … Read more