Python Forum
Instance of 'socket' has no 'error' member
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Instance of 'socket' has no 'error' member
#2
When the documentation says "socket.error" is an exception, the "socket" part is the socket module, not an instance of socket. Everywhere you use "s.error" you should use "socket.error".

Well, maybe you don't want to use socket.error either. PEP 3151 includes a lengthy discussion about broad exceptions like socket.error being too broad and you should use more focused exceptions.
Reply


Messages In This Thread
RE: Instance of 'socket' has no 'error' member - by deanhystad - May-13-2020, 03:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Class member become static Quasar999 1 763 Sep-16-2023, 12:52 PM
Last Post: deanhystad
  labels.append(self.classes.index(member.find('name').text)) hobbyist 1 1,995 Dec-15-2021, 01:53 PM
Last Post: deanhystad
  TypeError: sequence item 0: expected str instance, float found Error Query eddywinch82 1 5,289 Sep-04-2021, 09:16 PM
Last Post: eddywinch82
  How to define a variable in Python that points to or is a reference to a list member JeffDelmas 4 2,767 Feb-28-2021, 10:38 PM
Last Post: JeffDelmas
  Getting error when called through instance method aankrose 2 2,654 Mar-02-2019, 07:19 PM
Last Post: aankrose
  How I can recognize that member is classmethod of staticmethod? AlekseyPython 0 1,883 Feb-17-2019, 07:01 AM
Last Post: AlekseyPython
  How I can create reference to member of the class instance? AlekseyPython 8 3,998 Dec-05-2018, 06:24 AM
Last Post: AlekseyPython
  Class object instance. Link instance attribute to class. Can it be done easier. Windspar 7 4,332 Dec-03-2018, 11:16 PM
Last Post: Windspar
  How to check if class instance exists in a list of class instance objects? sonicblind 23 20,845 May-27-2018, 05:44 AM
Last Post: buran
  Socket crossplatform EOF error John 3 3,687 Dec-21-2017, 05:46 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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