Remove an '?' char from tqdm progressbar?
Question:
I wrote a code that download videos with progressbar using tqdm
module, and it works fine, just there is a ‘?’ char appeared in the progressbar and it only appears in the cmd.
here is a pic of the
progressbar
any help will be appreciated.
Answers:
It’s written in the FAQ and Known Issues of tqdm or here that windows has some problems with unicode characters. Use the parameter ascii=True
to fix this problem.
from time import sleep
from tqdm import trange
for i in trange(100, ascii=True):
sleep(0.01)
The parameter ascii=True
gave me an output like ###5. But ascii=' █'
solved the questionark issue.
I wrote a code that download videos with progressbar using tqdm
module, and it works fine, just there is a ‘?’ char appeared in the progressbar and it only appears in the cmd.
here is a pic of the
progressbar
any help will be appreciated.
It’s written in the FAQ and Known Issues of tqdm or here that windows has some problems with unicode characters. Use the parameter ascii=True
to fix this problem.
from time import sleep
from tqdm import trange
for i in trange(100, ascii=True):
sleep(0.01)
The parameter ascii=True
gave me an output like ###5. But ascii=' █'
solved the questionark issue.