Forums

AttributeError: module 'enum' has no attribute 'IntFlag'

Hello! I met a problem after a week of using PythonAnywhere: my written scripts that worked before suddenly just fail to start with an error

  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'

I didn't change a thing neither in code nor in bash, dont't understand what is wrong. Please tell me what can I do with this. Switching from Py3.6 to Py3.3 helps but I dont't like this solution.

Do you have a file called enum.py somewhere?

Mmmm, well, I've searched the file system and really found "enum" in site-packages. Dont't know how it appeared there, may be some other lib did that. Thank you!