<legend id='hIFm1'><style id='hIFm1'><dir id='hIFm1'><q id='hIFm1'></q></dir></style></legend>
<i id='hIFm1'><tr id='hIFm1'><dt id='hIFm1'><q id='hIFm1'><span id='hIFm1'><b id='hIFm1'><form id='hIFm1'><ins id='hIFm1'></ins><ul id='hIFm1'></ul><sub id='hIFm1'></sub></form><legend id='hIFm1'></legend><bdo id='hIFm1'><pre id='hIFm1'><center id='hIFm1'></center></pre></bdo></b><th id='hIFm1'></th></span></q></dt></tr></i><div id='hIFm1'><tfoot id='hIFm1'></tfoot><dl id='hIFm1'><fieldset id='hIFm1'></fieldset></dl></div>

    1. <tfoot id='hIFm1'></tfoot>

    2. <small id='hIFm1'></small><noframes id='hIFm1'>

        <bdo id='hIFm1'></bdo><ul id='hIFm1'></ul>

      Kivy 中的 HTTPS 请求

      时间:2023-09-01

        <tbody id='Ooh0Z'></tbody>

      <small id='Ooh0Z'></small><noframes id='Ooh0Z'>

      <tfoot id='Ooh0Z'></tfoot>

            <bdo id='Ooh0Z'></bdo><ul id='Ooh0Z'></ul>
                <i id='Ooh0Z'><tr id='Ooh0Z'><dt id='Ooh0Z'><q id='Ooh0Z'><span id='Ooh0Z'><b id='Ooh0Z'><form id='Ooh0Z'><ins id='Ooh0Z'></ins><ul id='Ooh0Z'></ul><sub id='Ooh0Z'></sub></form><legend id='Ooh0Z'></legend><bdo id='Ooh0Z'><pre id='Ooh0Z'><center id='Ooh0Z'></center></pre></bdo></b><th id='Ooh0Z'></th></span></q></dt></tr></i><div id='Ooh0Z'><tfoot id='Ooh0Z'></tfoot><dl id='Ooh0Z'><fieldset id='Ooh0Z'></fieldset></dl></div>
                <legend id='Ooh0Z'><style id='Ooh0Z'><dir id='Ooh0Z'><q id='Ooh0Z'></q></dir></style></legend>
              • 本文介绍了Kivy 中的 HTTPS 请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我一直在努力处理绑定到通过 AWS API Gateway 托管的 API 的 Kivy 应用程序中的 HTTPS 请求.首先,我从 Python3 转到 2,然后从 requests 库转到 kivy 的 URLRequest.

                I've been struggling with HTTPS requests in a Kivy app tied to an API hosted through AWS API Gateway. First, I moved from Python3 to 2 and then from the requests library to kivy's URLRequest.

                该应用程序在我的 linux 桌面上运行良好.当我使用请求库发出 API 请求时,出现 SSL 错误:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

                The app works fine on my linux desktop. When I made the API request with the requests library I got an SSL error: SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

                我转而使用 URLRequest,它似乎与 requests 有相同的 SSL 错误.传递给 URLRequest 错误回调的参数是:(, SSLError(1, '_ssl.c:503: error:14077410:SSLroutines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure')))

                I moved to using URLRequest, which seems to be having the same SSL error as requests was. Arguments passed into the URLRequest error callback are: (, SSLError(1, '_ssl.c:503: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'))

                我发现了这个 stackoverflow 问题:SSL23_GET_SERVER_HELLO:sslv3 警报握手失败 [基维]

                I found this stackoverflow question: SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure [Kivy]

                这意味着这与过时的 python 版本有关.

                Which implies this has to do with outdated python versions.

                只是 Kivy android 应用无法与 AWS API 网关通信吗?

                Is it just a Kivy android app is incapable of communicating with an AWS API Gateway?

                Buildozer .spec 行:要求 = hostpython2、kivy、future、python-dateutil、openssl、pyopenssl、jmespath、botocore、boto3、requests

                Buildozer .spec lines: requirements = hostpython2, kivy, future, python-dateutil, openssl, pyopenssl, jmespath, botocore, boto3, requests

                android.permissions = 互联网

                android.permissions = INTERNET

                更新:我使用 URL https://kivy 测试了一个 HTTPS GET 请求.org/logos/kivy-logo-black-64.png.这在 Android 应用程序中成功完成.这个问题似乎特定于 AWS API Gateway 使用的 SSL 版本

                UPDATE: I tested a HTTPS GET request with the URL https://kivy.org/logos/kivy-logo-black-64.png. This completed successfully in the Android App. This problem seems to be specific to the SSL version used by AWS API Gateway

                UPDATE2:Android 上的 Kivy 也可以与 Google Cloud Platform 的云功能 HTTPS 端点一起正常工作.更多证据表明此问题与 AWS API Gateway 密切相关.

                UPDATE2: Kivy on Android also works fine with Google Cloud Platform's cloud functions HTTPS endpoints. Even more evidence this issue is specifically tied to AWS API Gateway.

                推荐答案

                确保您的 .spec 文件具有 Internet 权限.另外,如果您使用 python2,我相信您的要求中需要hostpython2".我不确定您在其中的任何要求是否依赖于 python 2 或 3,但如果您使用的是 python 2,请确保它们适用于 python 2.此外,我认为您的请求要求中不需要 [安全].尝试只输入请求",您也可以尝试安装 sqlite 并将 g 添加到您的要求中.

                Make sure your .spec file has internet permissions. Also I believe you need 'hostpython2' in your requirements if you are using python2. Im not sure if any of the requirements you have in there are python 2 or 3 dependent but make sure they work for python 2 if that's what your using. Also I dont think you need the [security] in your requests requirement. Try just putting 'requests' also u might try installing sqlite and adding g that into your requirements as well.

                这篇关于Kivy 中的 HTTPS 请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Kivy 和 Google Play 服务 下一篇:为什么kivy无法导入kivy_clock?

                相关文章

                最新文章

              • <tfoot id='NvG6i'></tfoot>

                  <bdo id='NvG6i'></bdo><ul id='NvG6i'></ul>

                1. <i id='NvG6i'><tr id='NvG6i'><dt id='NvG6i'><q id='NvG6i'><span id='NvG6i'><b id='NvG6i'><form id='NvG6i'><ins id='NvG6i'></ins><ul id='NvG6i'></ul><sub id='NvG6i'></sub></form><legend id='NvG6i'></legend><bdo id='NvG6i'><pre id='NvG6i'><center id='NvG6i'></center></pre></bdo></b><th id='NvG6i'></th></span></q></dt></tr></i><div id='NvG6i'><tfoot id='NvG6i'></tfoot><dl id='NvG6i'><fieldset id='NvG6i'></fieldset></dl></div>

                2. <small id='NvG6i'></small><noframes id='NvG6i'>

                  1. <legend id='NvG6i'><style id='NvG6i'><dir id='NvG6i'><q id='NvG6i'></q></dir></style></legend>