It was working perfectly today, dident touch it at all, then I came back a few hours later and ran the program and got an error.
tyler@tyler-laptop:~$ python chat.py
Traceback (most recent call last):
File "chat.py", line 1, in
from socket import socket, gethostbyname, AF_INET, SOCK_STREAM;
File "/usr/lib/python2.5/socket.py", line 5, in
This module provides socket operations and some related functions.
AttributeError: 'module' object has no attribute 'AF_INET'
Error in sys.excepthook:
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/apport_python_hook.py", line 38, in apport_excepthook
from apport.fileutils import likely_packaged
File "/var/lib/python-support/python2.5/apport/__init__.py", line 1, in
from apport.report import Report
File "/var/lib/python-support/python2.5/apport/report.py", line 14, in
import subprocess, tempfile, os.path, urllib, re, pwd, grp, os, sys
File "/usr/lib/python2.5/urllib.py", line 26, in
import socket
File "/usr/lib/python2.5/socket.py", line 5, in
This module provides socket operations and some related functions.
AttributeError: 'module' object has no attribute 'AF_INET'
Original exception was:
Traceback (most recent call last):
File "chat.py", line 1, in
from socket import socket, gethostbyname, AF_INET, SOCK_STREAM;
File "/usr/lib/python2.5/socket.py", line 5, in
This module provides socket operations and some related functions.
AttributeError: 'module' object has no attribute 'AF_INET'
Any idea how to fix this :S, I dont understand why it would randomly stop working?
Thanks.











possible reasons:
1) you have multiple copies of your script, and accidentally ran a different one
2) automatic update run by a cron job?
3) filesystem corruption - how old is your hard disk?
CAN I HAS FIXD CAPSLOK KEE PLZ?
Login or register to post comments 1 point
1) Nope
2) Nope
3) 2 years
Login or register to post comments 1 point
I doubt this will work, but try fscking the partitions that the script and Python are on anyway.
Disclaimer: My posts may change (dramatically) within the first 15 minutes they're posted.
Login or register to post comments 0 points
Ah I found the problem, it seems I cant run socket things from my home folder ... I moved the script into a new folder and it worked.
Thanks.
Login or register to post comments 1 point
odd. are you using SElinux or something?
CAN I HAS FIXD CAPSLOK KEE PLZ?
Login or register to post comments 1 point