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

IOError for 0.4.6 #366

Closed
841020 opened this issue Nov 21, 2022 · 5 comments
Closed

IOError for 0.4.6 #366

841020 opened this issue Nov 21, 2022 · 5 comments

Comments

@841020
Copy link

841020 commented Nov 21, 2022

my colorama version is 0.4.6 and OS is windows 10 pro

@njsmith sir, i got IOError issue at 0.4.6 version

here is Traceback

Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\Users\103452\.vscode\extensions\ms-python.python-2022.2.1924087327\pythonFiles\lib\python\debugpy\__main__.py", line 45, in <module>
    cli.main()
  File "c:\Users\103452\.vscode\extensions\ms-python.python-2022.2.1924087327\pythonFiles\lib\python\debugpy/../debugpy\server\cli.py", line 444, in main
    run()
  File "c:\Users\103452\.vscode\extensions\ms-python.python-2022.2.1924087327\pythonFiles\lib\python\debugpy/../debugpy\server\cli.py", line 331, in run_module
    run_module_as_main(target_as_str, alter_argv=True)
  File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\lib\site-packages\flask\__main__.py", line 15, in <module>
    main(as_module=True)
  File "C:\Python27\lib\site-packages\flask\cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "C:\Python27\lib\site-packages\flask\cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "C:\Python27\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Python27\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python27\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python27\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Python27\lib\site-packages\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "C:\Python27\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
    show_server_banner(get_env(), debug, info.app_import_path, eager_loading)
  File "C:\Python27\lib\site-packages\flask\cli.py", line 670, in show_server_banner
    click.echo(message)
  File "C:\Python27\lib\site-packages\click\utils.py", line 267, in echo
    file = auto_wrap_for_ansi(file)
  File "C:\Python27\lib\site-packages\click\_compat.py", line 704, in auto_wrap_for_ansi
    ansi_wrapper = colorama.AnsiToWin32(stream, strip=strip)
  File "C:\Python27\lib\site-packages\colorama\ansitowin32.py", line 101, in __init__
    system_has_native_ansi = not on_windows or enable_vt_processing(fd)
  File "C:\Python27\lib\site-packages\colorama\winterm.py", line 183, in enable_vt_processing
    handle = get_osfhandle(fd)
IOError: [Errno 9] Bad file descriptor
@841020 841020 changed the title IOError for 0 IOError for 0.4.6 Nov 21, 2022
@841020
Copy link
Author

841020 commented Nov 21, 2022

I downgraded the version to 0.4.3 and it worked

@njsmith
Copy link
Collaborator

njsmith commented Nov 21, 2022

Oh I see. This is a py27-specific bug: I'm catching OSError, which on py3 would catch this, but I forgot that py2 has a different extension hierarchy and IOError and OSError are different.

@njsmith
Copy link
Collaborator

njsmith commented Nov 21, 2022

Oh, and it was already fixed in #364 :-) so just need a release.

@841020
Copy link
Author

841020 commented Nov 21, 2022

good job, thank you very much :)

@schlamar
Copy link
Contributor

schlamar commented Feb 2, 2023

Could you please make a new release to solve this bug

@841020 841020 closed this as completed Feb 20, 2023
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