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

NameError: name 'socket' is not defined. Did you mean: '_socket'?

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.5
    • Affects Version/s: None
    • Component/s: None
    • None

      PyMongo fails to import after PYTHON-3814

      Traceback (most recent call last):
        File "/Users/shane/.py2startup.py", line 47, in <module>
          from pymongo import *
        File "/Users/shane/git/mongo-python-driver/pymongo/__init__.py", line 92, in <module>
          from pymongo.mongo_client import MongoClient
        File "/Users/shane/git/mongo-python-driver/pymongo/mongo_client.py", line 66, in <module>
          from pymongo import (
        File "/Users/shane/git/mongo-python-driver/pymongo/uri_parser.py", line 37, in <module>
          from pymongo.client_options import _parse_ssl_options
        File "/Users/shane/git/mongo-python-driver/pymongo/client_options.py", line 27, in <module>
          from pymongo.pool import PoolOptions
        File "/Users/shane/git/mongo-python-driver/pymongo/pool.py", line 83, in <module>
          from pymongo.network import command, receive_message
        File "/Users/shane/git/mongo-python-driver/pymongo/network.py", line 34, in <module>
          from pymongo import _csot, helpers, message, ssl_support
        File "/Users/shane/git/mongo-python-driver/pymongo/ssl_support.py", line 24, in <module>
          import pymongo.pyopenssl_context as _ssl
        File "/Users/shane/git/mongo-python-driver/pymongo/pyopenssl_context.py", line 106, in <module>
          class _sslConn(_SSL.Connection):
        File "/Users/shane/git/mongo-python-driver/pymongo/pyopenssl_context.py", line 108, in _sslConn
          self, ctx: _SSL.Context, sock: Optional[socket.socket], suppress_ragged_eofs: bool
                                                  ^^^^^^
      NameError: name 'socket' is not defined. Did you mean: '_socket'?
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: