Jump to content
0x1101

sockets.py error

Recommended Posts

0x1101

Hi,

In section 2.9.1 Network Sockets in the flash slides #99 i found sockets.py not wanting to run. 

Error:

Traceback (most recent call last):
  File "socket.py", line 3, in <module>
    import socket
  File "############################ - Programming/Python Programming/Python_Samples/socket.py", line 8, in <module>
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
AttributeError: module 'socket' has no attribute 'AF_INET'

By changing the filename to something else besides sockets.py it runs perfectly. 

Hope this helps someone else. 

 

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×