Nov-01-2019, 07:14 PM
Support for using sockets with the context manager (with-block) was added in 3.2. You said you've checked that they're both at least 3.6, but could you double check the python versions involved?
I wouldn't think that'd be the issue, though, as the error would probably mention __enter__ instead of __exit__.
Do you happen to have a file named "socket.py" in your path? Maybe you're importing the wrong thing...
I wouldn't think that'd be the issue, though, as the error would probably mention __enter__ instead of __exit__.
Do you happen to have a file named "socket.py" in your path? Maybe you're importing the wrong thing...