在pwww.cppcns.comython專案中執行出現了「attributeerror: resourcemanager instance has no attribute 『_warn_unsafe_extraction'」問題,研究了一下,發現是setuptools在macos下的乙個問題(見下圖),我出現問題的是pymongo的庫,需要刪除pymongo,然後降級setuptools再重新安裝。
解決方法:
1、刪除pymongo:
sudo easy_install -mxn pmongo
2、降級setuptools:
sudo easy_install -mxn setuptools
sudo easy_install "setuptoolskhrcs<0.7"
3、重灌pymongo:
sudo easy_install pymongo
問題解決!!!!!
附錯誤資訊:
/system/library/frameworks/python.framework/versions/2.7/bin/python /users/yourtion/codes/python/knowme/server.py
traceback (most recent call last):
file "/users/yourtion/codes/python/knowme/server.py", line 5, in
from handler.api import userhandler
file "/users/yourtion/codes/python/knowme/handler/api.py", line 3, in
from model.user import user
file "/users/yourtion/codes/python/knowme/model/user.py", line 2, in
from mongoengine import *
file "build/bdist.macosx-10.9-intel/egg/mongoengine/__init__.py", line 1, in
file "build/bdist.macosx-10.9-intel/egg/mongoengine/document.py", line 4, in
file "/library/python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/__init__.py", line 80, in
file "/library/python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/connection.py", line 39, in 程式設計客棧gt;
file "/library/python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/mongo_client.py", line 44, in
file "/library/python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/__init__.py", line 41, in
file "/library/python/2.www.cppcns.com7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/_cbson.py", line 7, in
file "/library/python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/_cbson.py", line 4, in __bootstrap__
file "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 914, in resource_filename
%s file "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 1601, in get_resource_filename
"""retrieve a pep 302 "importer" for the given path item
file "bu", line 1629, in _extract_resource
from pkgutil import get_importer, impimporter
file "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 990, in get_cache_path
attributeerror: resourcemanager instance has no attribute '_warn_unsafe_extraction'
process finished with exit code 1
原文鏈結:
本文標題: 解決python出現_warn_unsafe_extraction問題的方法
本文位址:
出現錯誤怎麼解決
昨天出現了乙個問題,初始化結果集,我直到今天上午才發現這個問題,其實這個問題我之前已經栽過但是我沒有好好的總結,結果有重重的摔了個跟頭,我仔細執行了sql結果能夠執行,控制台也看到了執行的sql,這說明資料已經被成功的傳送到後台,但是前台確沒有被解析的資料,這是為何?苦苦思考,找不到願意,後來重新c...
解決python 輸出到csv 出現多空行的情況
這個問題的解決方案網上挺多的。with open r f desktop book3程式設計客棧.csv w encoding gb18030 newline as cwf spamwriter csv.writer cwf sp程式設計客棧amwriter.writerow 劇名 主要演員 上映時...
Unknown Source的出現及解決
答案很簡單,因為我們直接用的是jdk直接編譯好的class檔案。而rt.jar原始碼編譯打包的時候,是沒有將除錯資訊放入class檔案的。所以才會顯示unknown source。其實,道理很簡單,sun的類庫正常的情況下肯定不會有bug的,之前肯定都是除錯過很多遍的,所以沒有必要再加入除錯資訊,你...