-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module 'enum' has no attribute 'IntFlag' #1582
Comments
Hi @stvogel ! Looks like there is something wrong with your environment. Do you have enum34 installed by any chance? I.e. |
Ok, this is definitely the fault of enum34, I've tried to install it and was able to reproduce your error. Try uninstalling it with |
You were right. Uninstalling enum34 did the trick. Thanks a lot for your fast help. |
Hi, is there any other way to fix this? I have ros-melodic and removing enum is causing ros to be uninstalled |
@sbaktha Unfortunately, there is no way to fix or mitigate that on our side. The issue is with |
I had ros-melodic and since removing enum was causing ros to be uninstalled, I just uninstalled miniconda3. That fixed the issue. |
@sbaktha Use two virtual environments so you can have two enum34 versions installed. |
The problem is that the ROS environment modifies the PYTHONPATH. That not only affects Python2 but also Python3. For Python3, you can either temporarily reset PYTHONPATH or fix sys.path at the beginning your Python3 script. Here is what I did: import sys |
I'm using dvc 0.24.3 on ubuntu 18.04
When I call:
dvc pull
I get:
`$ dvc pull
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/home/xxx/.local/lib/python3.6/site-packages/dvc/init.py", line 72, in
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
File "/usr/lib/python3.6/warnings.py", line 131, in filterwarnings
import re
File "/usr/lib/python3.6/re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
if not enabled():
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
import re
File "/usr/lib/python3.6/re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/home/xxx/.local/lib/python3.6/site-packages/dvc/init.py", line 72, in
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
File "/usr/lib/python3.6/warnings.py", line 131, in filterwarnings
import re
File "/usr/lib/python3.6/re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Preparing to download data from 's3://xxx/projects/zzz/_dvc_repos'
Preparing to collect status from s3://xxx/projects/zzz/_dvc_repos
[##############################] 100% Collecting information
[##############################] 100% Analysing status.
Data '{'scheme': 'local', 'path': '/home/xxx/projects/zzz/predict_model.log'}' didn't change.
Checking out '{'scheme': 'local', 'path': '/home/xxx/projects/zzz/model2.h5'}' with cache '4945e5c7c8c4939d666056f7238c1c6c'.
Warning: Cache '5edea260bb42368385b85bb2e2e6e210.dir' not found. File '{'scheme': 'local', 'path': '/home/xxx/projects/zzz/models'}' won't be created.
Checking out '{'scheme': 'local', 'path': '/home/xxx/projects/zzz/models/model.json'}' with cache '54f1fb22ba329d9789fc815e4ae855e4'.
Warning: Cache '6551f44ccff789fac35b2ef1eee118b6' not found. File '{'scheme': 'local', 'path': '/home/xxx/projects/zzz/models/model.h5'}' won't be created.
Data '{'scheme': 'local', 'path': '/home/xxx/projects/zzz/data'}' didn't change.
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/home/xxx/.local/lib/python3.6/site-packages/dvc/init.py", line 72, in
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
File "/usr/lib/python3.6/warnings.py", line 131, in filterwarnings
import re
File "/usr/lib/python3.6/re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
if not enabled():
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
import re
File "/usr/lib/python3.6/re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/home/xxx/.local/lib/python3.6/site-packages/dvc/init.py", line 72, in
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
File "/usr/lib/python3.6/warnings.py", line 131, in filterwarnings
import re
File "/usr/lib/python3.6/re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
`
What's happening here?
The text was updated successfully, but these errors were encountered: