python-2.7 - 只读文件系统 : '/dev/null' while running google-cloud-sdk project

标签 python-2.7 ubuntu google-app-engine gcloud

我正在尝试运行现有的 gcloud 项目。这个项目在我以前的笔记本电脑上运行良好。我将完全相同的 SDK 和项目复制到我的新笔记本电脑上,但不再工作了。
这是我面临的错误:

dev_appserver.py app_impel.yaml --port=9099 --datastore_path=/home/rumi/Documents/impel/impel_eyevestor_ayaz --threadsafe_override=false --max_module_instances=1 --enable_console --enable_host_checking=false
INFO     2020-10-06 05:59:57,659 devappserver2.py:105] Skipping SDK update check.
WARNING  2020-10-06 05:59:57,877 simple_search_stub.py:1196] Could not read search indexes from /tmp/appengine.impel-eyevestor.rumi/search_indexes
INFO     2020-10-06 05:59:57,879 api_server.py:265] Starting API server at: http://localhost:44015
INFO     2020-10-06 05:59:59,617 dispatcher.py:255] Starting module "default" running at: http://localhost:9099
INFO     2020-10-06 05:59:59,619 admin_server.py:152] Starting admin server at: http://localhost:8000
INFO     2020-10-06 06:00:43,739 module.py:835] default: "GET /swagger.json HTTP/1.1" 304 -
WARNING  2020-10-06 06:00:43,928 sandbox.py:1086] The module _winreg is whitelisted for local dev only. If your application relies on _winreg, it is likely that it will not function properly in production.
WARNING  2020-10-06 06:00:43,988 sandbox.py:1086] The module _ctypes is whitelisted for local dev only. If your application relies on _ctypes, it is likely that it will not function properly in production.
ERROR    2020-10-06 06:00:44,513 wsgi.py:263] 
Traceback (most recent call last):
  File "/home/rumi/Documents/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/home/rumi/Documents/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/home/rumi/Documents/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/api_server.py", line 100, in <module>
    import eyevestor.security.decorators
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/eyevestor/security/decorators.py", line 13, in <module>
    from jose import jwt
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/lib/jose/jwt.py", line 11, in <module>
    from jose import jws
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/lib/jose/jws.py", line 8, in <module>
    from jose import jwk
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/lib/jose/jwk.py", line 13, in <module>
    from Crypto.PublicKey import RSA
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/lib/Crypto/PublicKey/RSA.py", line 42, in <module>
    from Crypto.Math.Numbers import Integer
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/lib/Crypto/Math/Numbers.py", line 42, in <module>
    from Crypto.Math._Numbers_gmp import Integer
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/lib/Crypto/Math/_Numbers_gmp.py", line 93, in <module>
    lib = load_lib("gmp", gmp_defs)
  File "/home/rumi/Desktop/eye_env/eyevestor-api-server-v1/api_server/lib/Crypto/Util/_raw_api.py", line 132, in load_lib
    full_name = find_library(name)
  File "/usr/lib/python2.7/ctypes/util.py", line 285, in find_library
    return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
  File "/usr/lib/python2.7/ctypes/util.py", line 269, in _findSoname_ldconfig
    null = open(os.devnull, 'wb')
  File "/home/rumi/Documents/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/stubs.py", line 278, in __init__
    raise IOError(errno.EROFS, 'Read-only file system', filename)
IOError: [Errno 30] Read-only file system: '/dev/null'
INFO     2020-10-06 06:00:44,524 module.py:835] default: "GET /api/v1/users/current HTTP/1.1" 500 -
也在这里尝试了这个步骤steps但随后面临另一个错误,如 file not accessible /dev/null .任何帮助,将不胜感激。

最佳答案

由于您的初始错误是

IOError: [Errno 30] Read-only file system:


您可以尝试删除 logging.conf 一起或删除写入文件的处理程序(如果您的应用程序具有写入操作),因为 App Engine 不支持对文件系统的任何写入操作(以及其他限制)。
在调查此错误时,我遇到了一些可以帮助您解决此错误的帖子:
  • Google Groups post
  • StackOverflow 帖子:
  • 1
  • 2


  • 我希望这个信息帮助。

    关于python-2.7 - 只读文件系统 : '/dev/null' while running google-cloud-sdk project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64221025/

    相关文章:

    c - 64 位 Ubuntu 上的利用

    amazon-web-services - 将 SSL 证书应用于 AWS EC2 Ubuntu 实例

    java - GAE Memcache 读\写问题

    python - Selenium ( python ): Errno 101 Connection Refused on screenshot?

    python-2.7 - 高效的python函数查找目录的大小

    python - python启动文本从何而来

    python - 如何在 Pandas 中仅保留每个订单的最新修改订单

    python - USB 设备 UDev 和 D-BUS

    java - 应用程序引擎网址请求 utf-8 字符变为 '??' 或 '???'

    google-app-engine - JDO 注释 : renaming columns across a hierarchy several levels deep