gpt4 book ai didi

python - Google Appengine 标准 Python 2.7 : Can't run Google Endpoints on localhost dev_appserver. py 不再

转载 作者:行者123 更新时间:2023-11-30 21:51:44 31 4
gpt4 key购买 nike

今天去处理一个较旧的 Python2.7 AppEngine 标准项目,但我似乎无法让端点工作。我下载了示例代码,看看我的项目是否是罪魁祸首,但该示例也不起作用。 https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python#run_local

dev_appserver.py --host 192.168.1.73 app.yaml --smtp_host=smtp.telus.net --smtp_port=25
INFO 2020-02-04 19:46:38,243 devappserver2.py:289] Skipping SDK update check.
INFO 2020-02-04 19:46:38,303 api_server.py:282] Starting API server at: http://localhost:45473
INFO 2020-02-04 19:46:38,325 dispatcher.py:267] Starting module "default" running at: http://192.168.1.73:8080
INFO 2020-02-04 19:46:38,326 admin_server.py:150] Starting admin server at: http://localhost:8000

一切开始都很好,但是当我到达端点时:/_ah/api/echo/v1/echo

Traceback (most recent call last):
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 311, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/main.py", line 19, in <module>
import endpoints
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/__init__.py", line 33, in <module>
from .apiserving import *
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/apiserving.py", line 71, in <module>
from endpoints_management.control import client as control_client
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints_management/__init__.py", line 19, in <module>
from . import auth, config, control, gen
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints_management/config/__init__.py", line 17, in <module>
from .service_config import ServiceConfigException
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints_management/config/service_config.py", line 25, in <module>
from apitools.base.py import encoding
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/apitools/base/py/__init__.py", line 23, in <module>
from apitools.base.py.credentials_lib import *
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/apitools/base/py/credentials_lib.py", line 44, in <module>
import fasteners
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/fasteners/__init__.py", line 23, in <module>
from fasteners.lock import locked # noqa
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/fasteners/lock.py", line 24, in <module>
from fasteners import _utils
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/fasteners/_utils.py", line 39, in <module>
from monotonic import monotonic as now # noqa
File "/home/mparkes/app_engine_projects/samples/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/monotonic.py", line 169, in <module>
raise RuntimeError('no suitable implementation for this system: ' + repr(e))
INFO 2020-02-04 19:46:45,501 module.py:865] default: "GET /_ah/api/static/proxy.html?usegapi=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.xh-S9KbEGSE.O%2Fam%3DwQc%2Fd%3D1%2Fct%3Dzgms%2Frs%3DAGLTcCNaUSRWzhd71dAsiMVOstVE3KcJZw%2Fm%3D__features__ HTTP/1.1" 500 -
RuntimeError: no suitable implementation for this system: IOError(13, 'file not accessible')

这与 2020 年 1 月 1 日放弃 python2.7 支持有关吗?根据记录,我的应用程序在 Appengine 上仍然运行良好,但我无法再进行开发。

[编辑]Google 云版本:

Google Cloud SDK 279.0.0
alpha 2020.01.31
app-engine-python 1.9.88
app-engine-python-extras 1.9.88

[编辑]Python:

Python 2.7.17 (default, Nov  7 2019, 10:07:09)
[GCC 7.4.0] on linux2

如果我迁移到 Python 3,那么我会丢失端点,并且需要完全重写我的客户端代码。

提前致谢。

最佳答案

我能够使用旧版本的 SDK 使其正常工作。

google_appengine_1.6.63

成功了。我猜我使用的最新版本 Google Cloud SDK 279.0.0 和 app-engine-python 1.9.88 dev_appserver.py 有问题

[编辑] 另请注意以下版本也适用

google_appengine_1.9.87

似乎是 1.9.88 的问题

希望这对遇到同样问题的人有所帮助。

关于python - Google Appengine 标准 Python 2.7 : Can't run Google Endpoints on localhost dev_appserver. py 不再,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60064693/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com