Mayavi: AttributeError : le module 'socket' n'a pas d'attribut 'AF_INET'

Créé le 12 juil. 2017  ·  2Commentaires  ·  Source: enthought/mayavi

depuis tvtk.tools importer tvtk_doc
tvtk_doc.main()
Traceback (dernier appel le plus récent) :
Fichier "", ligne 1, dans
Fichier "/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 ", ligne 403, dans main
s.configure_traits()
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traits/has_traits.py", ligne 2172, dans configure_traits
kind, handler, id, scrollable, args )
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/toolkit.py", ligne 213, dans view_application
id, défilable, args )
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/view_application.py", ligne 83, dans view_application
défilable, args ).ui.result
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/view_application.py", ligne 134, dans __init__
args = self.args )
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/view.py", ligne 433, dans ui
ui.ui( parent, genre )
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/ui.py", ligne 222, dans ui
self.rebuild( soi, parent )
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/toolkit.py", ligne 154, dans ui_live
à partir de . importer ui_live
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/ui_live.py", ligne 28, dans
depuis .ui_panel \
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/site-packages/traitsui/qt4/ui_panel.py", ligne 19, dans
importer cgi
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/cgi.py", ligne 39, dans
depuis email.parser importer FeedParser
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/parser.py", ligne 12, dans
depuis email.feedparser importer FeedParser, BytesFeedParser
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/feedparser.py", ligne 27, dans
à partir d'un message d'importation d'e-mail
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/message.py", ligne 16, dans
à partir des utilitaires d'importation d'e-mails
Fichier "/Users/apple/anaconda/envs/python3.5/lib/python3.5/email/utils.py", ligne 29, dans
prise d'importation
Fichier "/Users/apple/socket.py", ligne 4, dans
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
AttributeError : le module 'socket' n'a pas d'attribut 'AF_INET'

quelqu'un rencontre ce problème ? et comment le résoudre, grand merci ;

trait 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

Commentaire le plus utile

essayez de renommer le fichier en mysocket.py, cela fonctionnera très probablement
https://stackoverflow.com/questions/14755963/websocket-server-in-python-module-object-has-no-attribute-af-inet/14756156#14756156

Tous les 2 commentaires

import socket Fichier "/Users/apple/socket.py", ligne 4, dans s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
AttributeError : le module 'socket' n'a pas d'attribut 'AF_INET'
à partir de ce message, lorsque je supprime le fichier socket.py dans /Users/apple/socket.p cela fonctionne bien

essayez de renommer le fichier en mysocket.py, cela fonctionnera très probablement
https://stackoverflow.com/questions/14755963/websocket-server-in-python-module-object-has-no-attribute-af-inet/14756156#14756156

Cette page vous a été utile?
0 / 5 - 0 notes