question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

alive_bar not working properly on PyCharm's "Run" menu option

See original GitHub issue

Tried to run your simplified example (below) and the bar does now work properly. Working with PyCharm2020.1.2 on a macOS 10.15.5 with Python3.7.3 using an new empty project and installing alive-progress as suggested on PyPi The bar only shows itself already completed after the 10s, so no progress is shown.

import time

from alive_progress import alive_bar


def main():
    with alive_bar(10, force_tty=True) as bar:
        for i in range(10):
            time.sleep(1)
            bar()
    print("done")


if __name__ == "__main__":
    main()

I also tried running this code from Terminal. The result is that it shows and updates the bar apparently correctly a few times (3 bars going up and down work fine during the 0/10 progress) but as soon as 1/10 progress is reached by the output of the bar, it prints a bar in a new line for every update…

Am I doing something wrong? 😇 Let me know if you need more info. Hopefully we can get this beautiful took working for me 2 💪

PS: the gifs on PyPi for the Styles section are not being shown, with a message of size being too big ; )

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
rsalmeicommented, Apr 4, 2021

Yes, thanks @darkhark I wasn’t aware of that “Emulate terminal…” option! 👍

0reactions
c5creativecommented, Jul 21, 2021

Indeed @darkhark , force_tty=True was the magic sauce for PyCharm (2021.1) - cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

stdout progress bars don't work in Pycharm - Stack Overflow
3 Answers 3 · Step1: Go to Run ---> Edit Configurations · Step2: Check the option: Emulate terminal in output console.
Read more >
Troubleshooting | PyCharm Documentation - JetBrains
While working with PyCharm, you might encounter some warning or error messages. ... The Profile command is not available in the Run menu....
Read more >
the progressbar can't display in pycharm · Issue #35 - GitHub
When I use terminal to run the code, the progress bar is ok while using pycharm, the progressbar can't show in result.
Read more >
Alive-progress: A New Kind Of Progress Bar, with Real-time ...
Then you can manually adjust an item or prepare something, and get back into that running process as if it had never stopped!!...
Read more >
pycharm doesn't offer option to run code - Python Forum
So I'm looking at some code in the PyCharm IDE code editor, and I'd like to run it... so I click on run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found