3

urlfetch.fetch を使用して特定の URL をリクエストしようとすると、奇妙な DownloadError が発生します

コード例は次のとおりです。

url = 'https://iiko.net:9900/api/0/auth/access_token'
try:
    result = urlfetch.fetch(url, deadline=50, validate_certificate=False)
    if result.status_code == 200:
        pass
 except DownloadError as er:
    logging.exception(er)

そして、ここにエラーがあります:

Unable to fetch URL: https://iiko.net:9900/api/0/auth/access_token
Traceback (most recent call last):
  File "/base/data/home/apps/s~iappintheair/phil-dev.383038517236330514/handlers/api/test.py", line 18, in get
    result = urlfetch.fetch(url, deadline=50, validate_certificate=False)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/urlfetch.py", line 271, in fetch
    return rpc.get_result()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 613, in get_result
    return self.__get_result_hook(self)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/urlfetch.py", line 414, in _get_fetch_result
    raise DownloadError("Unable to fetch URL: " + url + error_detail)
DownloadError: Unable to fetch URL: https://iiko.net:9900/api/0/auth/access_token

このコードは数秒で失敗するため、締め切りとは関係がないと確信しています。

おそらく、このサイトの ssl 証明書が壊れているか、GAE の IP アドレスが何らかの理由でこのサイトによってブロックされているのですが、現在連絡が取れていません。

どんな助けでも感謝します、ありがとう!

4

1 に答える 1