AppEnginePlatformWarning:urllib3在Google App Engine沙箱上使用URLFetch,而不是套接字 [英] AppEnginePlatformWarning: urllib3 is using URLFetch on Google App Engine sandbox instead of sockets

查看:216
本文介绍了AppEnginePlatformWarning:urllib3在Google App Engine沙箱上使用URLFetch,而不是套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用烧瓶制作Slack僵尸程序的应用程序引擎上遇到此错误。只要我从Slackbot发送POST请求就会发生。



不幸的是,错误中提供的url是一个死链接。


/ base / data / home / apps / / lib / requests /如何使用套接字而不是URLFetch? packages / urllib3 / contrib / appengine.py:115:
AppEnginePlatformWarning:urllib3在Google App上使用URLFetch
引擎沙箱而不是套接字。要直接使用套接字而不是
URLFetch,请参阅 https://urllib3.readthedocs。 io / en / latest / contrib.html



解决方案

Google的套接字文档,套接字可以通过设置 GAE_USE_SOCKETS_HTTPLIB 环境变量。此功能似乎只在付费应用上可用,并影响结算。

尽管您发布的错误被记录为App Engine中的错误,但此线程建议(请参阅回复#8)该错误实际上是意思是作为一个警告,文本AppEnginePlatformWarning似乎无论如何建议。



source page for appengine.py也具有指导意义。



您没有发布任何关于您的实施的信息,但在Google App Engine标准版上使用URLFetch通过AppEngineManager应该没问题,但是你会得到这个错误。


I'm getting this error on app engine using flask to make a Slack bot. It happens whenever I send a POST request from Slackbot.

Unfortunately, the url provided in the error is a dead link. How do I go about using sockets instead of URLFetch?

/base/data/home/apps/[REDACTED]/lib/requests/packages/urllib3/contrib/appengine.py:115: AppEnginePlatformWarning: urllib3 is using URLFetch on Google App Engine sandbox instead of sockets. To use sockets directly instead of URLFetch see https://urllib3.readthedocs.io/en/latest/contrib.html.

解决方案

As detailed on Google's Sockets documentation, sockets can be used by setting the GAE_USE_SOCKETS_HTTPLIB environment variable. This feature seems to be available only on paid apps, and impacts billing.

Though the error you posted gets logged as an Error in App Engine, this thread suggests (see reply #8) that the error is actually meant as a warning, which the text "AppEnginePlatformWarning" seems to suggest anyway.

The comment block on the source page for appengine.py is also instructive.

You didn't post any information about your implementation, but on Google App Engine Standard edition, using URLFetch via the AppEngineManager should be just fine, though you will get the error.

这篇关于AppEnginePlatformWarning:urllib3在Google App Engine沙箱上使用URLFetch,而不是套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆