如何解决Boto AttributeError: 'module' 对象没有属性 'HTTPSConnection'
我在 ubuntu 18.04 和 Google App Engine python2.7 中工作。因为使用 python2.7 我只能使用 boto 而不能使用 boto3。然而,我收到此错误,似乎无法修复它...
ERROR 2021-05-12 12:17:29,792 webapp2.py:1552] 'module' object has no attribute 'HTTPSConnection'
Traceback (most recent call last):
File "/home/depotter/Downloads/google-cloud-sdk-282.0.0-linux-x86_64/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.2/webapp2.py",line 1535,in __call__
rv = self.handle_exception(request,response,e)
File "/home/depotter/Downloads/google-cloud-sdk-282.0.0-linux-x86_64/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.2/webapp2.py",line 1529,in __call__
rv = self.router.dispatch(request,response)
File "/home/depotter/Downloads/google-cloud-sdk-282.0.0-linux-x86_64/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.2/webapp2.py",line 1278,in default_dispatcher
return route.handler_adapter(request,line 1102,in __call__
return handler.dispatch()
File "/home/depotter/Downloads/google-cloud-sdk-282.0.0-linux-x86_64/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.2/webapp2.py",line 572,in dispatch
return self.handle_exception(e,self.app.debug)
File "/home/depotter/Downloads/google-cloud-sdk-282.0.0-linux-x86_64/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.2/webapp2.py",line 570,in dispatch
return method(*args,**kwargs)
File "/home/depotter/projects/mwcentral/server/./online_ordering/ctg/menu.py",line 204,in post
self.send_menu(company_key,store_id,timestamp)
File "/home/depotter/projects/mwcentral/server/./online_ordering/ctg/menu.py",line 257,in send_menu
result = self.upload_menu(menu,company_key_id,store_id)
File "/home/depotter/projects/mwcentral/server/./online_ordering/ctg/menu.py",line 295,in upload_menu
key.set_contents_from_string(file)
File "/home/depotter/projects/mwcentral/lib/boto/s3/key.py",line 1442,in set_contents_from_string
encrypt_key=encrypt_key)
File "/home/depotter/projects/mwcentral/lib/boto/s3/key.py",line 1309,in set_contents_from_file
chunked_transfer=chunked_transfer,size=size)
File "/home/depotter/projects/mwcentral/lib/boto/s3/key.py",line 762,in send_file
chunked_transfer=chunked_transfer,line 963,in _send_file_internal
query_args=query_args
File "/home/depotter/projects/mwcentral/lib/boto/s3/connection.py",line 671,in make_request
retry_handler=retry_handler
File "/home/depotter/projects/mwcentral/lib/boto/connection.py",line 1071,in make_request
retry_handler=retry_handler)
File "/home/depotter/projects/mwcentral/lib/boto/connection.py",line 913,in _mexe
self.is_secure)
File "/home/depotter/projects/mwcentral/lib/boto/connection.py",line 705,in get_http_connection
return self.new_http_connection(host,port,is_secure)
File "/home/depotter/projects/mwcentral/lib/boto/connection.py",line 755,in new_http_connection
connection = http_client.HTTPSConnection(
AttributeError: 'module' object has no attribute 'HTTPSConnection'
绝对无能为力,任何帮助表示赞赏..
解决方法
请参阅这两个链接。它们都适用于 Python2.6,但它们可能类似于 Python2.7 或为您指明正确的方向
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。