-
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
AttributeError: 'Tqdm' object has no attribute 'sp' #2442
Comments
I think this is an ignorable error caused by the trace's attempt to print a |
@casperdcl The line you've linked is a wrapper that collects all the errors that happened in the workers when they are not able to upload/download something, which is a rather frequent occurrence in dvc. Is there any way we could handle that situation gracefully with tqdm? That |
ah the error is https://travis-ci.com/iterative/dvc/jobs/228530997#L2622 Hmm not sure about how to clean this up in |
That one is actually unrelated. It is about ssh, while the one we are discussing is about oss. It seems weird that it throws an attribute error when something unrelated to the progress bar itself fails. It looks like if anything within |
yes I think that's tqdm/tqdm#548 - nobody's posted a solution yet |
@casperdcl Some uploads/downloads failing is a normal situation for us (e.g. someone |
hmm I've just pushed a commit to |
@efiop it would be great if you could post a minimal reproducible example of this. I've tried and can't get the same error. |
@casperdcl Not able to reproduce with other remotes or with a minimal example without threads. Probably a race condition or something. |
@efiop I've tried to reproduce with threads and still couldn't manage. from __future__ import print_function
from tqdm import tqdm, trange
from concurrent.futures import ThreadPoolExecutor
N = int(1e7)
def fun(N):
try:
with trange(N, desc="1", leave=False) as t:
for i in t:
if i == N // 10:
break
except:
with trange(N, desc="2", leave=False) as t:
for i in t:
if i == N // 10:
raise ValueError("fun times")
else:
with trange(N, desc="3", leave=False) as t:
for i in t:
if i == N // 10:
raise ValueError("fun times")
tqdm.get_lock()
with ThreadPoolExecutor(max_workers=8) as executor:
executor.map(fun, [N] * 400) |
@casperdcl I see, well, races are always hard to reliably reproduce :) The fix from devel branch seems like an acceptable workaround, do you plan on merging it into master? If you do, then we could close this issue as well. |
doesn't have to be perfectly reliable, but at least being able to reproduce once would help. I'm hesitant to merge that |
@casperdcl True, it was the first and the last time I've seen it so far. It was also on 2.7, which might be related. Alright, let's close this one and if it ever happens again, we could get back to it. |
Getting it once again on py2 https://travis-ci.com/iterative/dvc/jobs/255935049#L3369 |
@casperdcl What do you think? If this takes any effort, we can just forget about this, as py2 is almost dead anyways. |
@efiop is this the actual error? https://travis-ci.com/iterative/dvc/jobs/255935049#L2554 Not sure how the trace output is set up. Don't know if for example there's another error but the printing of said error on a killed thread is also causing a different error on L3369... |
@casperdcl Not seeing any other error, seems like it is the cause. |
Will be fixed by #1818 |
From https://travis-ci.com/iterative/dvc/jobs/228530997 #2428
@casperdcl Could you please take a look?
The text was updated successfully, but these errors were encountered: