Pythonkeyerror solves the _ warn_unsafe_extraction problem in Python.
When running the "AttributeError: ResourceManager instance has no attribute '_ warn_unsafe_extraction'" Problem in the Python project, I studied it and found that it was a problem of setuptools in MacOS (SEE ), I encountered a problem with the pymongo library. I need to delete pymongo, downgrade setuptools, and reinstall it.
Solution:
1. Delete pymongo:
sudo easy_install -mxN pmongo
2. Downgrade setuptools:
sudo easy_install -mxN setuptoolssudo easy_install "setuptools<0.7"
3. reinstall pymongo:
sudo easy_install pymongo
Solve the problem !!!!!
With error message:
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/yourtion/Codes/python/knowme/server.pyTraceback (most recent call last): File "/Users/yourtion/Codes/python/knowme/server.py", line 5, in <module> from Handler.api import UserHandler File "/Users/yourtion/Codes/python/knowme/Handler/api.py", line 3, in <module> from Model.user import User File "/Users/yourtion/Codes/python/knowme/Model/user.py", line 2, in <module> from mongoengine import * File "build/bdist.macosx-10.9-intel/egg/mongoengine/__init__.py", line 1, in <module> File "build/bdist.macosx-10.9-intel/egg/mongoengine/document.py", line 4, in <module> File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/__init__.py", line 80, in <module> File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/pymongo/connection.py", line 39, in <module> 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 <module> File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/__init__.py", line 41, in <module> File "/Library/Python/2.7/site-packages/pymongo-2.6.3-py2.7-macosx-10.8-intel.egg/bson/_cbson.py", line 7, in <module> 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 "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", 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_pathAttributeError: ResourceManager instance has no attribute '_warn_unsafe_extraction'Process finished with exit code 1
Articles you may be interested in:
- Summary of Common Errors of new hands when Python is running for 17 times
- Causes and solutions for R6034 errors of com components written in Python
- Python errors and exceptions
- 10 common mistakes made by Python programmers
- 17 errors frequently encountered by beginners of python
- Python error: AttributeError: ''module ''object has no attribute ''' setulultencoding''
- Python error handling
- Python prompts [Errno 32] How to Solve the thread crash error caused by Broken pipe
- Python base64 decode incorrect padding error Solution
- Errors that are easy to encounter when setting variables as default values in Python