python报错

简介:

supervisor的错误日志如下:




Traceback (most recent call last):
  File "/home/himalayas/owengine/owprice/server.py", line 10, in <module>
    import action
  File "/home/himalayas/owengine/owprice/action/__init__.py", line 2, in <module>
    from owprice import owPriceHandler
  File "/home/himalayas/owengine/owprice/action/owprice.py", line 11, in <module>
    from cjson import decode as json_decode
  File "build/bdist.linux-x86_64/egg/cjson.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/cjson.py", line 4, in __bootstrap__
  File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 945, in resource_filename
    self, resource_name
  File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 1633, in get_resource_filename
    self._extract_resource(manager, self._eager_to_zip(name))
  File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 1661, in _extract_resource
    self.egg_name, self._parts(zip_path)
  File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 1025, in get_cache_path
    self.extraction_error()
  File "/home/himalayas/virtualenv/python2.7-fd/lib/python2.7/site-packages/pkg_resources.py", line 991, in extraction_error
    raise err
pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  [Errno 13] Permission denied: '/root/.python-eggs'

The Python egg cache directory is currently set to:

  /root/.python-eggs

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.



解决方法:

去掉/home/himalayas/.python-eggs 这个目录用户组合other的x权限。

drwxr-xr-x   5 himalayas himalayas  4096 Aug 14 15:43 .python-eggs

drwxr--r--   5 himalayas himalayas  4096 Aug 14 15:43 .python-eggs


对程序启动没有影响,只是一个warning,但是对于supervisor来说对这个warning太敏感,所以导致使用supervisor启动的时候会启动不起来。


      本文转自Tenderrain 51CTO博客,原文链接:http://blog.51cto.com/tenderrain/1688151,如需转载请自行联系原作者








相关文章
|
3月前
|
Web App开发 Python
Python使用selenium的Chrome下载文件报错解决
Python使用selenium的Chrome下载文件报错解决
49 0
|
7月前
|
关系型数据库 MySQL Linux
Python安装mysqlclient报错避坑
MySQL是常用的开源数据库,Python环境下django框架连接MySQL数据库用的是mysqlclient库,今天在用pip安装mysqlclient库时报错,特记录一下,避免后续继续踩坑。
295 0
|
7月前
|
JavaScript Python 内存技术
error C:\Users\Acer\Downloads\Desktop\hrsaas-84\node_modules\deasync: 莫名其妙报错一堆python问题
error C:\Users\Acer\Downloads\Desktop\hrsaas-84\node_modules\deasync: 莫名其妙报错一堆python问题
126 0
|
6月前
|
Python
python flask 后端报错 ImportError: cannot import name ‘cached_prope‘
问题python flask 后端报错 ImportError: cannot import name ‘cached_prope‘flask程序启动但抛出该错误,是因为werkzeug 版本过高,需要降低版本即可 解决:一般这种情况是需要注意第三方库版本的对应,werkzeug需要0.16.0 版本时 flask的版本应该时1.x.x 的版本,不能是2.x过高的版本。
66 0
|
2月前
|
安全 网络安全 API
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
74 1
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
|
4月前
|
Python
Python Playwright 打包报错 Please run the following command to download new browsers
Python Playwright 打包报错 Please run the following command to download new browsers
79 0
|
9天前
|
Python
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win
IDA3.12版本的python,依旧报错IDAPython: error executing init.py.No module named ‘impRefer to the message win
|
4月前
|
Ubuntu Python
Python(六)使用pycharm创建项目报错:ModuleNotFoundError No module named distutils.util
在ubuntu上使用pycharm创建项目的时候报错: ModuleNotFoundError: No module named 'distutils.util'
611 0
|
1月前
|
索引 Python
Python程序报错合集
Python程序报错合集
14 0
|
1月前
|
文字识别 Python
python代码运行报错:No module named 'aliyunsdkcore'
用python调用阿里云图片OCR识别,使用的是阿里云官方给的传本地图片文件进行检测的代码,运行报错:No module named 'aliyunsdkcore'。在pycharm python软件包和终端里安装aliyunsdkcore这个模块都失败了。