Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sockets and asyncio on Windows depend on SYSTEMROOT env var #118234

Labels
docsDocumentation in the Doc direasy
@jariwezerhu

Description

@jariwezerhu

Bug report

Bug description:

os.environ.clear()# THIS WAS THE CAUSE!!!importasyncio

This causes the following:

Traceback (most recent call last):  File"c:\Users\user\Documents\Development\main\main.py", line 3,in<module>    import asyncio  File"C:\Program Files\Python311\Lib\asyncio\__init__.py", line 42,in<module>    from .windows_events import*  File"C:\Program Files\Python311\Lib\asyncio\windows_events.py", line 8,in<module>    import _overlappedOSError: [WinError 10106] The requested service provider could not be loaded or initialized

It took me a whole day to figure out that os.environ.clear() causes this bug to occur. I'm not sure if this is supposed to occur, I just thought I would post this in case other people are struggling with this.

CPython versions tested on:

3.8, 3.9, 3.10, 3.11

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc direasy

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp