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

Nested + desc = buggy PyCharm output #203

Closed
lrq3000 opened this issue Jul 20, 2016 · 12 comments
Closed

Nested + desc = buggy PyCharm output #203

lrq3000 opened this issue Jul 20, 2016 · 12 comments
Labels
invalid ⛔ Not-an-issue or upstream (not-our-issue) p0-bug-critical ☢ Exception rasing

Comments

@lrq3000
Copy link
Member

lrq3000 commented Jul 20, 2016

Using the desc= parameter with nested progress bars (the inner one) corrupts the output and gets you multiple progress bars like this:

0pzecsg

Only two nested progress bars were used in this example.
Removing desc makes it go back to normal.

Reported by @CrazyPython in #87.

@lrq3000 lrq3000 added the p0-bug-critical ☢ Exception rasing label Jul 20, 2016
@CrazyPython
Copy link
Contributor

CrazyPython commented Jul 21, 2016

@lrq3000 This is not limited to PyCharm. This happens everywhere. Occurs in:

  • Raw terminal
  • PyCharm embedded terminal
  • PyCharm Run/Debug window

Also, if you don't have a desc= parameter, it occurs in the PyCharm Run/Debug window but not any terminal.

It's more important than you think.

@lrq3000
Copy link
Member Author

lrq3000 commented Jul 21, 2016

@CrazyPython Can you tell me what platform and what version of Python you are using please?

@casperdcl
Copy link
Sponsor Member

As a guess it may be related to not being able to detect the terminal width correctly due to your environment; and the fallback width only works without a "desc". Or... when I try 2 bars with a large window size and then resize to a small window while they're running (or vice versa) the first bar doesn't resize.

@lrq3000
Copy link
Member Author

lrq3000 commented Jul 21, 2016

@CrazyPython Could you please try @casperdcl hypothesis please by setting ncols=10 for each tqdm bar in your loop, and see if it fixes some issues? (because I guess there are several ones in this case).

@CrazyPython
Copy link
Contributor

CrazyPython commented Jul 22, 2016

@lrq3000 @casperdcl CrazyPython CI has finally finished. Here are the results:

Environment Result Old Result
Terminal ✓*
PyCharm

And PyCharm embedded terminal is a simple wrapper over the normal terminal so no point in testing that.

* CrazyPython CI has detected an 1 anomaly:

After program exits on terminal, the prompt is left with the junk $ 9.85it/s]

@casperdcl
Copy link
Sponsor Member

presumably same if you set dynamic_ncols=True?

@lrq3000
Copy link
Member Author

lrq3000 commented Oct 25, 2016

This is because PYCHARM does not support the "up" control character, so you
cannod get a nice output with multiple progress bars. You either have do
limit yourself to 1 bar or use the os console to run your python script if
you need multiple bars.
Le 25 Oct. 2016 10:56, "Noé Casas" notifications@github.com a écrit :

This happens to me in the Pycharm Python Console without nested bars, just
a normal progress bar. Neither ncols=10 nor dynamic_cols=True have effect.

My environment is Ubuntu 16.04, Python 2.7.11 and Pycharm Community
2016.2.3.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#203 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABES3vm7loXkdGPPvYGR7OwF8-gDNKDuks5q3cQugaJpZM4JROq9
.

@casperdcl casperdcl added the invalid ⛔ Not-an-issue or upstream (not-our-issue) label Nov 12, 2016
@casperdcl
Copy link
Sponsor Member

can't do anything about pycharm here... if someone want to create a PR which prints a warning for pycharm environments go ahead.

This was referenced Nov 13, 2016
@thehesiod
Copy link

pycharm support tracked here: https://youtrack.jetbrains.com/issue/PY-6646

@jimanvlad
Copy link

Tracked here now: https://youtrack.jetbrains.com/issue/PY-33061
Expected in 2019.1

@JulienMaille
Copy link

@jimanvlad Are nested progressbars supposed to work in 2019.3?

@HugoDel
Copy link

HugoDel commented Jun 8, 2020

You can use "Emulate terminal in output console" under the Execution/Run&Debug window and set leave=False in the nested bar params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid ⛔ Not-an-issue or upstream (not-our-issue) p0-bug-critical ☢ Exception rasing
Projects
None yet
Development

No branches or pull requests

7 participants