We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My script is parsing through log files. Script worked fine on my old machine with alive-progress 2.4.1. My new machine is using alive-progress 3.1.4
TotalFileSize is the total bytes of all files to be parsed.
My 2.4.1 alive_bar: with alive_bar(TotalFileSize, title=f'Processing {TotalMB} MB',monitor='[{percent:.0%}] {count}/{total} Bytes') as bar:
with alive_bar(TotalFileSize, title=f'Processing {TotalMB} MB',monitor='[{percent:.0%}] {count}/{total} Bytes') as bar:
I see in 3.0 there was support added for units. My new alive_bar:
with alive_bar(TotalFileSize, title=f'Processing Files', unit='B', scale='SI', precision=1) as bar:
My code loops throught the files, reading one line at a time. For each line processed I calculate the line size and update the bar:
bar(sys.getsizeof(line)-sys.getsizeof('\n'))
I never quite reach 100%. Must be math is slightly off. After processing all files I bump the bar to 100% with: bar(TotalFileSize-bar.current())
bar(TotalFileSize-bar.current())
This worked in alive-progress 2.4.1, but no longer works in 3.1.4.
bar.current() fails with error: TypeError: 'int' object is not callable
The text was updated successfully, but these errors were encountered:
Have you tried just bar.current (without the brackets)?
bar.current
Sorry, something went wrong.
bar.current works. Thanks!
README.md should be updated as it references bar.current() twice
bar.current()
Thanks @TheTechRobo.
Yep, the readme is not up-to-date. I'm going to fix it, thanks @jspilinek.
I just wanted to let you know that the auto-suggestions of ipython do show current is not a method:
current
fix bar.current docs
492ea3b
fix #253
No branches or pull requests
My script is parsing through log files. Script worked fine on my old machine with alive-progress 2.4.1. My new machine is using alive-progress 3.1.4
TotalFileSize is the total bytes of all files to be parsed.
My 2.4.1 alive_bar:
with alive_bar(TotalFileSize, title=f'Processing {TotalMB} MB',monitor='[{percent:.0%}] {count}/{total} Bytes') as bar:
I see in 3.0 there was support added for units. My new alive_bar:
with alive_bar(TotalFileSize, title=f'Processing Files', unit='B', scale='SI', precision=1) as bar:
My code loops throught the files, reading one line at a time. For each line processed I calculate the line size and update the bar:
bar(sys.getsizeof(line)-sys.getsizeof('\n'))
I never quite reach 100%. Must be math is slightly off. After processing all files I bump the bar to 100% with:
bar(TotalFileSize-bar.current())
This worked in alive-progress 2.4.1, but no longer works in 3.1.4.
bar.current() fails with error:
TypeError: 'int' object is not callable
The text was updated successfully, but these errors were encountered: