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

Progress bar breaks piping commands #652

Closed
igorbrigadir opened this issue Aug 15, 2022 · 0 comments
Closed

Progress bar breaks piping commands #652

igorbrigadir opened this issue Aug 15, 2022 · 0 comments
Labels

Comments

@igorbrigadir
Copy link
Contributor

The progress bar does not fully disable itself if using twarc in the command line and piping input output, for example:

cat ids.txt | twarc2 users

Error:

  File "/home/user/env/lib/python3.7/site-packages/twarc/decorators2.py", line 245, in __init__
    if (os.stat(infile.name).st_size / (1024 * 1024 * 1024)) > 1:
FileNotFoundError: [Errno 2] No such file or directory: '<stdin>'
Exception ignored in: <function tqdm.__del__ at 0x7f06df0d19e0>
Traceback (most recent call last):
  File "/home/user/env/lib/python3.7/site-packages/tqdm/std.py", line 1147, in __del__
    self.close()
  File "/home/user/env/lib/python3.7/site-packages/tqdm/std.py", line 1266, in close
    if self.disable:
AttributeError: 'FileLineProgressBar' object has no attribute 'disable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant