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

tqdm.reset() crashes when disable=True #1125

Closed
5 of 8 tasks
michael-koeller opened this issue Feb 10, 2021 · 1 comment · Fixed by #1126
Closed
5 of 8 tasks

tqdm.reset() crashes when disable=True #1125

michael-koeller opened this issue Feb 10, 2021 · 1 comment · Fixed by #1126
Assignees
Labels
c1-quick 🕐 Complexity low p0-bug-critical ☢ Exception rasing to-merge ↰ Imminent
Projects
Milestone

Comments

@michael-koeller
Copy link

  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
    • documentation request (i.e. "X is missing from the documentation." If instead I want to ask "how to use X?" I understand StackOverflow#tqdm is more appropriate)
    • new feature request
  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
haendel:~/projects/telekom/trunk/sandbox/tqdm> python3
Python 3.9.1 (default, Jan  8 2021, 17:17:43) 
[Clang 12.0.0 (clang-1200.0.32.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tqdm, sys
>>> print(tqdm.__version__, sys.version, sys.platform)
4.56.0 3.9.1 (default, Jan  8 2021, 17:17:43) 
[Clang 12.0.0 (clang-1200.0.32.28)] darwin
>>> t = tqdm.tqdm(total=10, disable=True)
>>> t.reset()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Volumes/projects/telekom/trunk/sandbox/tqdm/tqdm/std.py", line 1348, in reset
    self.last_print_t = self.start_t = self._time()
AttributeError: 'tqdm' object has no attribute '_time'

This issue is similar/related to Issue 624.
My test above actually uses current master source:

Branch: master
Commit: 94842e1
Date: 2021-02-09

~/projects/sandbox/tqdm> pip3 list
Package        Version
-------------- -------
libxml2-python 2.9.10
pip            21.0.1
~/projects/sandbox/tqdm> pip3 install -e git://github.com/tqdm/tqdm.git@master#egg=tqdm
Obtaining tqdm from git+git://github.com/tqdm/tqdm.git@master#egg=tqdm
  Updating ./src/tqdm clone (to revision master)
  Running command git fetch -q --tags
  Running command git reset --hard -q 94842e1027570867885788dc9d7fe038484f085b
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Installing collected packages: tqdm
  Running setup.py develop for tqdm
Successfully installed tqdm
haendel:~/projects/telekom/trunk/sandbox/tqdm>pip3 list
Package        Version Location
-------------- ------- -----------------------------------------------------
libxml2-python 2.9.10
pip            21.0.1
tqdm           4.56.1  /Volumes/projects/telekom/trunk/sandbox/tqdm/src/tqdm
~/projects/sandbox/tqdm> python3 -c "import tqdm; print(tqdm.__version__)"
4.56.0
casperdcl added a commit that referenced this issue Feb 10, 2021
@casperdcl casperdcl mentioned this issue Feb 10, 2021
9 tasks
@casperdcl casperdcl self-assigned this Feb 10, 2021
@casperdcl casperdcl added c1-quick 🕐 Complexity low p0-bug-critical ☢ Exception rasing to-merge ↰ Imminent labels Feb 10, 2021
@casperdcl casperdcl added this to the Non-breaking milestone Feb 10, 2021
@casperdcl casperdcl added this to Next Release in Casper Feb 10, 2021
Casper automation moved this from Next Release to Done Feb 10, 2021
@michael-koeller
Copy link
Author

That was really quick. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c1-quick 🕐 Complexity low p0-bug-critical ☢ Exception rasing to-merge ↰ Imminent
Projects
Casper
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants