rsalmei / alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
MIT License
5.53k stars 206 forks source link

Doesn't work in IDLE #60

Closed voeb closed 3 years ago

voeb commented 4 years ago

I tried to run the basic example but it doesn't work, i get this errors: image

Does someone know how to fix it?

rsalmei commented 4 years ago

Hey man, that is very odd. Is your system saying that sys.__stdout__ is None? That does not make sense. Which platform are you using? What code did you try?

voeb commented 4 years ago

i use Windows and it says what i send in the issue

rsalmei commented 4 years ago

Yeah, I had already seen that, given the paths "C:"... I need more than that. How did you run your program? Which terminal do you use? Are you using Windows Subsystem for Linux?

voeb commented 4 years ago

I run it just in the normal python shell image

Or do i have to use it in ascciinema

rsalmei commented 4 years ago

What do you mean by "normal python shell"? Please describe exactly which way have you used to run it.

voeb commented 4 years ago

The code is on the left side and the shell is on the right side, i use Python 3.9.0 image

If i run the program i get the error on the left side of my screen.

rsalmei commented 4 years ago

I still didn't see how you ran the code. How do you enter this "Python Shell" and ran Progress.py?

voeb commented 4 years ago

on the top of the editor is run image Hover iver that and then run module then i get that error

rsalmei commented 4 years ago

Hummm, ok, I really have never seen this shell. And this whole Python Shell, how did you run it? Is it an icon on your desktop?

TheTechRobo commented 4 years ago

I recognize that - that's IDLE.

It comes standard with the default installation iirc.

Joep, next time please be more specific...

voeb commented 4 years ago

Okay, sorry. But i didn't know that there were multiple different python shells

rsalmei commented 4 years ago

Ohhh now I see it, thank you @TheTechRobo!!

@JoepTM, that's not "the" Python shell nor even a "normal" shell, it's actually a program in Python that happens to run Python programs, used for learning purposes only.

I've never tried it, and can't possibly know what it does different internally. What I do know is that alive-progress uses some pretty advanced inner workings of Python, that probably are not available inside IDLE.

I strongly recommend installing iPython, it's an incredible REPL for any Python use. Just pip install ipython in your shell, and then ipython.

For windows, I'd also recommend installing WSL "Windows Subsystem for Linux", which is amazing.

voeb commented 4 years ago

Okay, i'll try it tomorrow, thanks.

voeb commented 3 years ago

it worked thanks!!