'tqdmm' object has no attribute 'leave' #2

Closed
opened 2020-12-29 16:49:10 +01:00 by cchikis · 2 comments
cchikis commented 2020-12-29 16:49:10 +01:00 (Migrated from github.com)

When attempting to run the example on in readme, I produce the following error.

from time import sleep
from parfor import parfor
@parfor(range(10), (3,))
def fun(i, a):
sleep(1)
return a*i**2
print(fun)

File "", line 3, in
@parfor(range(10), (3,))

File "---/parfor/init.py", line 234, in decfun
return pmap(fun, *args, **kwargs)

File "---/parfor/init.py", line 483, in pmap
return [p[i] for i in range(length)] #collect the results

File "---/parfor/init.py", line 149, in exit
if not self.leave:

AttributeError: 'tqdmm' object has no attribute 'leave'

When attempting to run the example on in readme, I produce the following error. from time import sleep from parfor import parfor @parfor(range(10), (3,)) def fun(i, a): sleep(1) return a*i**2 print(fun) File "<ipython-input-29-965bd1bff26a>", line 3, in <module> @parfor(range(10), (3,)) File "---/parfor/__init__.py", line 234, in decfun return pmap(fun, *args, **kwargs) File "---/parfor/__init__.py", line 483, in pmap return [p[i] for i in range(length)] #collect the results File "---/parfor/__init__.py", line 149, in __exit__ if not self.leave: AttributeError: 'tqdmm' object has no attribute 'leave'
wimpomp commented 2021-01-04 12:38:29 +01:00 (Migrated from github.com)

Thanks for the report. It turns out that it doesn't work in combination with older versions of tqdm. I have updated the requirements for parfor and installation/upgrade with pip should take care of this now.

Thanks for the report. It turns out that it doesn't work in combination with older versions of tqdm. I have updated the requirements for parfor and installation/upgrade with pip should take care of this now.
cchikis commented 2021-01-04 18:04:44 +01:00 (Migrated from github.com)

Thank you!

Thank you!
Sign in to join this conversation.