蟒蛇 & suds“导入错误:无法导入名称 getLogger”
我正在使用 Ubuntu 11.04 (natty)。我一直在使用 Suds 来使用 SOAP Web 服务。一切都工作正常......直到它不是。我无法再进口肥皂水。我已经从 Ubuntu 存储库卸载并重新安装了 Suds,但仍然遇到相同的导入错误(请参阅下面的 IDLE 回溯)。我正在使用 Python 2.7.1 和 Suds 0.4.1-2。有谁对如何解决这个问题有任何想法吗?
>>> import suds
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import suds
File "/usr/lib/pymodules/python2.7/suds/__init__.py", line 154, in <module>
import client
File "/usr/lib/pymodules/python2.7/suds/client.py", line 23, in <module>
import suds.metrics as metrics
File "/usr/lib/pymodules/python2.7/suds/metrics.py", line 23, in <module>
from logging import getLogger
ImportError: cannot import name getLogger
>>>
I'm using Ubuntu 11.04 (natty). I have been using Suds to consume a SOAP web service. Everything was working fine... until it wasn't. I can no longer import Suds. I've uninstalled and re-installed Suds from the Ubuntu repositories but still get the same import error (see IDLE traceback below). I'm using Python 2.7.1 and Suds 0.4.1-2. Does anyone have any ideas on how to solve this problem??
>>> import suds
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import suds
File "/usr/lib/pymodules/python2.7/suds/__init__.py", line 154, in <module>
import client
File "/usr/lib/pymodules/python2.7/suds/client.py", line 23, in <module>
import suds.metrics as metrics
File "/usr/lib/pymodules/python2.7/suds/metrics.py", line 23, in <module>
from logging import getLogger
ImportError: cannot import name getLogger
>>>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
logging
是Python的标准模块。 Python 找不到它有几个可能的原因:logging
模块(打印sys.path
以获取 Python 将搜索的路径列表) )PYTHONPATH
(默认的 Python 搜索路径)logging
模块)logging
is a standard module of Python. There are several possible reasons why Python can't find it anymore:logging
module in the path (printsys.path
to get a list of paths Python will search)PYTHONPATH
(the default Python search path)logging
module)