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

AttributeError: module 'progressbar' has no attribute 'DataSize' #7

Closed
rainerkohlberger opened this issue Jun 10, 2020 · 8 comments
Closed
Assignees
Labels
troubleshooting Solutions to common problems.

Comments

@rainerkohlberger
Copy link

hi, sorry one more after the update to creativeai 0.1.1:

Traceback (most recent call last):
  File "/home/rainer/miniconda3/envs/myenv/bin/texturize", line 11, in <module>
    load_entry_point('texturize', 'console_scripts', 'texturize')()
  File "/home/rainer/dev/texturize/src/texturize/__main__.py", line 277, in main
    result = process_file(config, filename)
  File "/home/rainer/dev/texturize/src/texturize/__main__.py", line 157, in process_file
    for octave, result_img in process_image(config, io.load_image_from_file(source)):
  File "/home/rainer/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in generator_context
    x = next(gen)
  File "/home/rainer/dev/texturize/src/texturize/__main__.py", line 190, in process_image
    encoder = models.VGG11(pretrained=True, pool_type=torch.nn.AvgPool2d)
  File "/home/rainer/.local/lib/python3.8/site-packages/creativeai/image/encoders/models.py", line 52, in __init__
    super(VGG11, self).__init__(block_type, pool_type, input_type="RGB", **kwargs)
  File "/home/rainer/.local/lib/python3.8/site-packages/creativeai/image/encoders/base.py", line 33, in __init__
    self.load_pretrained(self.FILENAME, self.HEXDIGEST)
  File "/home/rainer/.local/lib/python3.8/site-packages/creativeai/image/encoders/base.py", line 36, in load_pretrained
    fullpath = io.download_to_file(model, hexdigest)
  File "/home/rainer/.local/lib/python3.8/site-packages/creativeai/image/encoders/io.py", line 27, in download_to_file
    progressbar.DataSize(),
AttributeError: module 'progressbar' has no attribute 'DataSize'
@alexjc
Copy link
Collaborator

alexjc commented Jun 10, 2020

Can you check which version of progressbar2 was installed?
https://progressbar-2.readthedocs.io/en/latest/_modules/progressbar/widgets.html#DataSize

I will look into this shortly...

@alexjc alexjc added the bug Something isn't working label Jun 10, 2020
@alexjc alexjc self-assigned this Jun 10, 2020
@alexjc
Copy link
Collaborator

alexjc commented Jun 10, 2020

Likely it's an old version of progressbar (v1). It might be a question of doing:
poetry install

Let me know if that fixes it!

@alexjc alexjc added troubleshooting Solutions to common problems. and removed bug Something isn't working labels Jun 11, 2020
@alexjc alexjc closed this as completed Jun 11, 2020
@rainerkohlberger
Copy link
Author

progressbar2 is installed (3.51.3) and poetry update + poetry install unfortunately didn’t do the trick. Still getting the same error.

@rainerkohlberger
Copy link
Author

Might be related: I've edited setup-cuda.yml and removed 'he1778fa_0' and 'py3.8_cuda102_cudnn7_0' respectively. If I don't do that, this error occurs:

Solving environment: failed

ResolvePackageNotFound: 
  - python==3.8.3=he1778fa_0
  - pytorch==1.5.0=py3.8_cuda102_cudnn7_0

@alexjc
Copy link
Collaborator

alexjc commented Jun 14, 2020

No, the .yml file is unrelated. Did you install and run from a clean environment?

@alexjc alexjc reopened this Jun 14, 2020
@rainerkohlberger
Copy link
Author

yes, I've removed the environment, pulled the latest version and created the environment again, getting the same error message.

@alexjc
Copy link
Collaborator

alexjc commented Jun 26, 2020

This works with the automated builds, so I don't know why your installation is not working.

Try tying this pip list | grep progress and you should get the following (or above):

progressbar2       3.51.3

@alexjc
Copy link
Collaborator

alexjc commented Jun 26, 2020

I can't reproduce this, but a couple last things:

  1. There are also now notebooks in the #/examples/ folder, which you can run on Google Colab without any local installation required.
  2. I've updated setup-cpu.yml and setup-cuda.yml to remove the pinned version numbers when they are not necessary. (Both were tested just now.)

@alexjc alexjc closed this as completed Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
troubleshooting Solutions to common problems.
Projects
None yet
Development

No branches or pull requests

2 participants