Skip to content
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

outdatated progress bar? #276

Closed
brando90 opened this issue Feb 5, 2023 · 1 comment
Closed

outdatated progress bar? #276

brando90 opened this issue Feb 5, 2023 · 1 comment
Labels

Comments

@brando90
Copy link

brando90 commented Feb 5, 2023

Description

Error when importing progressbar2.

Code

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'

Versions

  • Python version: import sys; print(sys.version): 3.10.9 (main, Jan 11 2023, 09:18:20) [Clang 14.0.6 ]
  • Python distribution/environment: CPython/Anaconda/IPython/IDLE. conda
  • Operating System: Windows 10, Ubuntu Linux, etc. mac os x
  • Package version: 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

@brando90 brando90 changed the title outdata progress bar? outdatated progress bar? Feb 5, 2023
@wolph
Copy link
Owner

wolph commented Feb 6, 2023

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

@github-actions github-actions bot added the Stale label Aug 21, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants