Forums

Flask callback vk bot

i setuped vk_api package(pip install --user vk_api) and now I always get an error i don't know what making

Traceback (most recent call last):
  File "/home/Valery663/mysite/flask_app.py", line 4, in <module>
    from flask import Flask,request
  File "/usr/local/lib/python3.6/dist-packages/flask/__init__.py", line 17, in <module>
    from werkzeug.exceptions import abort
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/__init__.py", line 152, in <module>
    __import__('werkzeug.exceptions')
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/exceptions.py", line 67, in <module>
    from werkzeug._internal import _get_environ
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/_internal.py", line 11, in <module>
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

[edit by admin: formatting]

Do you have a file in your source code called enum.py, or a directory called enum? If so, you should rename it -- I think what's happening is that one of your files is overriding the system enum package.