Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4781

OSError on Windows when importing asyncio

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.10, 4.9.2
    • Affects Version/s: 4.9, 4.9.1
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      [2024/09/20 11:42:54.221] Traceback (most recent call last):
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\lib\aws_handle_oidc_creds.py", line 12, in <module>
      [2024/09/20 11:42:54.221]     from pyop.authz_state import AuthorizationState
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pyop\authz_state.py", line 14, in <module>
      [2024/09/20 11:42:54.221]     from .storage import StatelessWrapper
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pyop\storage.py", line 18, in <module>
      [2024/09/20 11:42:54.221]     import pymongo
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pymongo\__init__.py", line 91, in <module>
      [2024/09/20 11:42:54.221]     from pymongo.asynchronous.mongo_client import AsyncMongoClient
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pymongo\asynchronous\mongo_client.py", line 62, in <module>
      [2024/09/20 11:42:54.221]     from pymongo import _csot, common, helpers_shared, uri_parser
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pymongo\uri_parser.py", line 37, in <module>
      [2024/09/20 11:42:54.221]     from pymongo.client_options import _parse_ssl_options
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pymongo\client_options.py", line 36, in <module>
      [2024/09/20 11:42:54.221]     from pymongo.ssl_support import get_ssl_context
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pymongo\ssl_support.py", line 26, in <module>
      [2024/09/20 11:42:54.221]     import pymongo.pyopenssl_context as _ssl
      [2024/09/20 11:42:54.221]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\authawsvenv\Lib\site-packages\pymongo\pyopenssl_context.py", line 20, in <module>
      [2024/09/20 11:42:54.221]     import asyncio
      [2024/09/20 11:42:54.221]   File "C:\python\Python311\Lib\asyncio\__init__.py", line 42, in <module>
      [2024/09/20 11:42:54.222]     from .windows_events import *
      [2024/09/20 11:42:54.222]   File "C:\python\Python311\Lib\asyncio\windows_events.py", line 8, in <module>
      [2024/09/20 11:42:54.223]     import _overlapped
      [2024/09/20 11:42:54.223] OSError: [WinError 10106] The requested service provider could not be loaded or initialized
      [2024/09/20 11:42:54.271] Traceback (most recent call last):
      [2024/09/20 11:42:54.271]   File "Z:\data\mci\401ea096db7a62eebb183f2f608bede6\drivers-tools\.evergreen\auth_aws\aws_tester.py", line 204, in <module>
      

      https://spruce.mongodb.com/task/mongo_go_driver_aws_auth_test__version~4.4_os_aws_auth~windows_64_aws_auth_test_patch_251c7323742c733bf7421835c652d032b77079f1_66eda3eef8e51e0007ab12c6_24_09_20_16_34_09/logs?execution=0

      We can add a try/except on the import of from pymongo.asynchronous.mongo_client import AsyncMongoClient

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: