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
type object tqdm has no attribute '_lock' #457
Comments
I'm getting the same error via my CI: https://travis-ci.org/CartoDB/cartoframes/jobs/282396234#L676-L682 We were previously on 4.17.1 but since 4.18.0 has been released our tests are failing from this AttributeError on |
Sorry about this. The way it's done now, you need to have initialised at least one so from tqdm import tqdm
tqdm(disable=True, total=0) # initialise internal lock
tqdm.write("test") should work. You could also do
instead to manually set the internal lock. Will change this all ASAP to not require any of this. |
Could you try the |
Yep, will do! |
After installing the |
great, you probably need to put |
Nice, thanks for the speedy response. I love tqdm :) |
Tests are also running perfectly with the devel branch here! Thanks for the quick response! :) |
fixed in master now |
Still having the same issue with
|
argh. really |
is this consistently reproducible? |
I have rolled back to 4.17. It's not crashing any more. But before that it crashed every time I used tqdm.tqdm. |
could you check if the current |
I am experiencing this issue since updating to 4.29.0 and Python 3.7.2 on macOS 10.14.
If I downgrade tqdm to 4.28.1 with the same environment, the issue goes away. |
@mjstevens777 might need a look? |
I'm sorry, I wasn't aware of that part of the API. I opened a PR. |
Prevent this bug from occurring tqdm/tqdm#457
Hi, experiencing again the same issue in 2024: The whole stacktrace is here:
and the version is 4.66.2
I used the same code on another machine with no issue, but I don't have the version number on this other machine... |
Hello,
I have been using TQDM for quite a while now with a lot of pleasure. However after running a python script this morning, TQDM has started to generate a error and cannot write anything anymore. I have tried to resolve the issue by reinstalling tqdm without succes. I couldn't found any solution to this problem, so I hope you guys can give a clue to what the problem is.
OS: MacOSX 10.12
Python 3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
$conda list |grep tqdm
tqdm 4.18.0
tqdm 4.18.0 py_0 conda-forge
Code:
from tqdm import tqdm
tqdm.write("hello")
Traceback (most recent call last):
File "", line 1, in
File "/Users/john-melle/anaconda/lib/python3.6/site-packages/tqdm/_tqdm.py", line 497, in write
with cls.external_write_mode(file=file, nolock=nolock):
File "/Users/john-melle/anaconda/lib/python3.6/contextlib.py", line 82, in enter
return next(self.gen)
File "/Users/john-melle/anaconda/lib/python3.6/site-packages/tqdm/_tqdm.py", line 512, in external_write_mode
cls._lock.acquire()
AttributeError: type object 'tqdm' has no attribute '_lock'
The text was updated successfully, but these errors were encountered: