1

我之前遇到过这个错误,在修复它之后,我遇到了这个:

I/python  ( 7569):  Traceback (most recent call last):
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/app/main.py", line 102, in <module>
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/app/main.py", line 63, in IncarcaAfise
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 91, in urlretrieve
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 237, in retrieve
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 205, in open
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 356, in open_http
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 369, in http_error
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 632, in http_error_302
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 659, in redirect_internal
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 202, in open
I/python  ( 7569):    File "/home/cristi/Desktop/AplicatieMinister/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/urllib.py", line 214, in open_unknown
I/python  ( 7569):  IOError: [Errno url error] unknown url type: 'https'

使用了以下(相关)代码:

import urllib
urllib.urlretrieve('https://dl.dropboxusercontent.com/u/95587456/Evenimente/1.jpg','/storage/emulated/0/Temp/1.jpg')

我尝试用 http 替换“https”,但遇到了同样的错误。现在,在互联网、论坛等上看了一段时间后,我看到人们已经重新编译了支持 SSL 的 Python。但是,我找不到可以解释如何完成的指南。另外,如果我要重新编译 python,我会丢失到目前为止安装的库吗?

使用的操作系统是 Ubuntu 14.04,带有 Python 2.7,应用程序由 buildozer 编译(使用 Kivy)并在 Android 上运行(来自 APK)。APK 的 Internet 权限设置为 true。

4

1 回答 1

1

尝试将“openssl”添加到您的 buildozer 或 p4a 要求中。– 恶劣的

也为我工作。被卡了很久。添加以上评论作为答案,以便像我这样的其他新手可以轻松找到它

于 2018-03-13T18:32:59.143 回答