Python Forum
Working socket() program...isn't
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working socket() program...isn't
#6
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...
Reply


Messages In This Thread
Working socket() program...isn't - by ptrivino - Nov-01-2019, 01:50 AM
RE: Working socket() program...isn't - by ptrivino - Nov-01-2019, 05:07 PM
RE: Working socket() program...isn't - by ptrivino - Nov-01-2019, 06:54 PM
RE: Working socket() program...isn't - by nilamo - Nov-01-2019, 07:14 PM
RE: Working socket() program...isn't - by ptrivino - Nov-01-2019, 07:51 PM
RE: Working socket() program...isn't - by nilamo - Nov-01-2019, 08:58 PM
RE: Working socket() program...isn't - by ptrivino - Nov-01-2019, 10:35 PM
RE: Working socket() program...isn't - by ptrivino - Nov-02-2019, 12:25 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020