-
-
Notifications
You must be signed in to change notification settings - Fork 207
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: 'function' object has no attribute 'flush' #2
Comments
If my experience on MacOS is any guide, you're sending some output to the console which interferes with alive_bar's call to sys.stdout.flush(). |
Hey @jhmenke, I'm using 3.7.3 myself and this error is not triggered. Actually, I did try on Ubuntu 18.04, Python 3.7.3 and 2.7.15, installed with |
I was looking into Python Streams (https://docs.python.org/2.7/library/io.html#module-io), and really there are other methods a stream should have. Are your code by any chance calling |
Okay, so it works in the regular terminal. I was using PyCharm and i guess that somehow has a different terminal which does not work. Interestingly, tqdm works just fine so i guess something has to be checked and done differently. Thanks for your comments though! This is related for tqdm: tqdm/tqdm#307 (comment) |
No problem! I can release a version with |
Great news @jhmenke, I've made it work in Pycharm! At least in the latest 2019.2 it did work. It's curious I did not have the flush error you reported. |
With force_tty=True it works in PyCharm, great! Thank you so much for your time. |
You're welcome. 👍 |
I am trying a simple example to replace tqdm with the alive_bar
with alive_bar(int(self.ann_params["epochs"])) as pbar:
Unfortunately, this line raises an Exeption:
The text was updated successfully, but these errors were encountered: