Mayavi: AttributeError: module 'socket' has no attribute 'AF_INET'

Created on 12 Jul 2017  ·  2Comments  ·  Source: enthought/mayavi

from tvtk.tools import tvtk_doc
tvtk_doc.main()
Traceback (most recent call last):
File "", line 1, in
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/mayavi-4.5.0-py3.5-macosx-10.6-x86_64.egg/tvtk/tools/tvtk_doc.py", line 403, in main
s.configure_traits()
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traits/has_traits.py", line 2172, in configure_traits
kind, handler, id, scrollable, args )
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/toolkit.py", line 213, in view_application
id, scrollable, args )
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/view_application.py", line 83, in view_application
scrollable, args ).ui.result
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/view_application.py", line 134, in __init__
args = self.args )
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/view.py", line 433, in ui
ui.ui( parent, kind )
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/ui.py", line 222, in ui
self.rebuild( self, parent )
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/toolkit.py", line 154, in ui_live
from . import ui_live
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/ui_live.py", line 28, in
from .ui_panel \
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/ui_panel.py", line 19, in
import cgi
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/cgi.py", line 39, in
from email.parser import FeedParser
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/parser.py", line 12, in
from email.feedparser import FeedParser, BytesFeedParser
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/feedparser.py", line 27, in
from email import message
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/message.py", line 16, in
from email import utils
File "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/utils.py", line 29, in
import socket
File "/Users/apple/socket.py", line 4, in
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
AttributeError: module 'socket' has no attribute 'AF_INET'

anyone encounter this problem ? and how to resolve it, great thank;

traits 4.6.0
vtk 7.0.0
traitsui 5.1.0
pyqt 4.11.4
python 3.5.3
qt 4.8.7
pyface 5.1.0

Most helpful comment

All 2 comments

import socket File "/Users/apple/socket.py", line 4, in s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
AttributeError: module 'socket' has no attribute 'AF_INET'
from this message , when i remove socket.py file in /Users/apple/socket.p this works well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yassersouri picture yassersouri  ·  5Comments

relyativist picture relyativist  ·  16Comments

rambalachandran picture rambalachandran  ·  9Comments

GaelVaroquaux picture GaelVaroquaux  ·  13Comments

dnacombo picture dnacombo  ·  7Comments