You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import progressbar
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/brandomiranda/opt/anaconda3/envs/explaining-emergence-icl-in-fms-with-diversity/lib/python3.10/site-packages/progressbar/__init__.py", line 4, in <module>
from .shortcuts import progressbar
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/brandomiranda/opt/anaconda3/envs/explaining-emergence-icl-in-fms-with-diversity/lib/python3.10/site-packages/progressbar/shortcuts.py", line 1, in <module>
from . import bar
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/brandomiranda/opt/anaconda3/envs/explaining-emergence-icl-in-fms-with-diversity/lib/python3.10/site-packages/progressbar/bar.py", line 50, in <module>
class ProgressBarBase(collections.Iterable, ProgressBarMixinBase):
AttributeError: module 'collections' has no attribute 'Iterable'
It's hard to say what has caused this, but the collections.Iterable on line 50 hasn't been a thing for several years: 9af4d70
Oddly enough, that version already included the __version__ so I'm not sure what's happened there. I've got a feeling that you might have a mix between this package and the original progressbar package which is replaced by this one.
In any case, updating to the latest version (or uninstalling and reinstalling) should fix your issues
Description
Error when importing progressbar2.
Code
Versions
import sys; print(sys.version)
:3.10.9 (main, Jan 11 2023, 09:18:20) [Clang 14.0.6 ]
conda
mac os x
import progressbar; print(progressbar.__version__)
: doesn't let me do this because progressbar2 is too old.ref: https://stackoverflow.com/questions/75355808/attributeerror-module-collections-has-no-attribute-iterable-for-progressbar
The text was updated successfully, but these errors were encountered: