不要紧,需要执行pip install --update pymongo
我正在关注这个页面- http://api.mongodb.org/python/current/tutorial.html
当我输入的时候
from pymongo import MongoClient我得到了这个错误。我做错了什么?
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Error in sys.excepthook:
Traceback (most recent call last):
File "/Applications/TextMate.app/Contents/SharedSupport/Bundles/Python.tmbundle/Support/sitecustomize.py", line 44, in tm_excepthook
io = fdopen(error_fd, 'wb', 0)
OSError: [Errno 9] Bad file descriptor
Original exception was:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable发布于 2014-09-02 04:48:57
这实际上是由于一个旧版本的pymongo。pip安装--更新pymongo修复了它
https://stackoverflow.com/questions/25612426
复制相似问题