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

Issue on Windows 10 CMD and Poweshell #309

Open
GoingMyWay opened this issue Jul 22, 2021 · 5 comments
Open

Issue on Windows 10 CMD and Poweshell #309

GoingMyWay opened this issue Jul 22, 2021 · 5 comments

Comments

@GoingMyWay
Copy link

  File "D:\x\run.py", line 164, in run_sequential
    bpar = tqdm.tqdm(total=args.t_max)
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\tqdm\std.py", line 1086, in __init__
    self.refresh(lock_args=self.lock_args)
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\tqdm\std.py", line 1380, in refresh
    self.display()
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\tqdm\std.py", line 1514, in display
    self.sp(self.__repr__() if msg is None else msg)
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\tqdm\std.py", line 335, in print_status
    fp_write('\r' + s + (' ' * max(last_len[0] - len_s, 0)))
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\tqdm\std.py", line 328, in fp_write
    fp.write(_unicode(s))
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\tqdm\utils.py", line 223, in inner
    return func(*args, **kwargs)
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\colorama\ansitowin32.py", line 41, in write
    self.__convertor.write(text)
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\colorama\ansitowin32.py", line 162, in write
    self.write_and_convert(text)
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\colorama\ansitowin32.py", line 190, in write_and_convert
    self.write_plain_text(text, cursor, len(text))
  File "C:\Users\x\anaconda3\envs\py37\lib\site-packages\colorama\ansitowin32.py", line 195, in write_plain_text
    self.wrapped.write(text[start:end])
OSError: [WinError 1] Incorrect function

Does anyone know what is wrong?

@mara004
Copy link

mara004 commented Sep 3, 2021

Indeed looks like a colorama issue, perhaps a wrong call of the windows colouring API.

@GoingMyWay
Copy link
Author

Indeed looks like a colorama issue, perhaps a wrong call of the windows colouring API.

Thanks. Do you know how to address this issue?

@mara004
Copy link

mara004 commented Sep 4, 2021

Unfortunately not. I don't know how colorama works internally. However, it seems that it is not your code that triggers the issue, but the tqdm library, so you could try contacting the maintainers of tqdm. Maybe they know (and can fix) the cause.

@GoingMyWay
Copy link
Author

Unfortunately not. I don't know how colorama works internally. However, it seems that it is not your code that triggers the issue, but the tqdm library, so you could try contacting the maintainers of tqdm. Maybe they know (and can fix) the cause.

Thank you.

@tartley
Copy link
Owner

tartley commented Oct 17, 2022

Recent merges may have fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants