-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSLError python 3.7.1 #1559
Comments
I struggled with similar problem and used https://github.com/kivy/python-for-android/pull/1537/files to solve it. I think the problem is, that the python in your p4a is not built with ssl support, which solves abovementioned link. |
@opacam Bug is aviable, checked on master branch . Python 3.7: module requests3
Python 2.7 module requests
env has provided @Jonast , but now with my patch (forked repo): (fix The path python3.7 does not exist ) |
I googled and the problem appears to be that Can you tell us which Android version the phone you see this on has? |
@Jonast
|
That's normal/expected, there are no system certificates available per default. You need to either ship the specific cert, or e.g. include mozilla's cert bundle yourself and make OpenSSL use it. (Or use the horrible/insecure solution and disable certificate verification) |
Why is normal? Old version this application are work correctly. Old version are compiled by python 2 and buildozer==0.34. |
Oh that worked? Interesting. It never worked for me, so maybe someone else knows (I manually ship the mozilla cert bundle and make openssl use it, then it works) |
You need source of project? |
Check 3.apk on you phone) Or compile with old api and and with buildozer==0.34 and cython==0.25.2 with default settings |
I checked again, and writed new update on this issue: |
Build apk only with: p4a-py3-api28ndk21. With p4a-py2-api19-ndkbundle
Sources, my forked repo: |
@nontxt the SSL module should build on p4a's latest git master now, so hopefully this should be resolved! I'll close the ticket for now, if it doesn't actually work let me know and I can reopen @homdx if you still have some of these other issues, can you make a separate ticket to keep things a bit cleaner? |
So, I have some issues when I try build my kivy project with python 3.7.1 and requests module.
1st issue: When I tried build project with unopen python modules, I got issue with python version (venv can't found python3.7).
I fixed it when I made altinstall python 3.7.1
2nd issue: Now venv found python3.7 and install requirements modules but it can't install dependes for this modules(for example requests)
For fix this issues i added all dependes in requirements list. It'is works!
Finally I got apk. I deployed it at my device and got SSLError:
"Can't connect to HTTPS URL because the SSL module is not available."
Anybody have idea?
Versions
Description
// REPLACE ME: What are you trying to get done, what has happened, what went wrong, and what did you expect?
buildozer.spec
Spec file:
`[app]
title = Qiwi Wallets
package.name = QWS
package.domain = org.qws
source.dir = .
source.include_exts = py,png,jpg,kv,atlas
version = 1.6.3
requirements = python3,kivy==1.10.1,openssl,qiwipy,urllib3,python-dateutil,chardet,certifi,idna,requests
icon.filename = %(source.dir)s/icon.png
orientation = portrait
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.permissions = INTERNET
android.api = 27
android.minapi = 21
android.sdk = 28
android.ndk_path = /home/kivy/Android/android-ndk-r16b/
android.sdk_path = /home/kivy/Android/android-sdk-28/`
Logs
`12-25 14:25:17.397 5719 5736 I python : [WARNING] [Config ] Older configuration version detected (0 instead of 20)
12-25 14:25:17.397 5719 5736 I python : [WARNING] [Config ] Upgrading configuration in progress.
12-25 14:25:17.411 5719 5736 I python : [INFO ] [Logger ] Record log in /data/user/0/org.qws.qws/files/app/.kivy/logs/kivy_18-12-25_0.txt
12-25 14:25:17.412 5719 5736 I python : [INFO ] [Kivy ] v1.10.1
12-25 14:25:17.413 5719 5736 I python : [INFO ] [Python ] v3.7.1 (default, Dec 25 2018, 08:27:52)
12-25 14:25:17.413 5719 5736 I python : [Clang 5.0.300080 ]
12-25 14:25:17.685 5719 5736 I python : [INFO ] [Factory ] 194 symbols loaded
12-25 14:25:18.281 5719 5736 I python : [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
12-25 14:25:18.603 5719 5736 I python : [INFO ] [Window ] Provider: sdl2
12-25 14:25:18.647 5719 5736 I python : [INFO ] [GL ] Using the "OpenGL ES 2" graphics system
12-25 14:25:18.648 5719 5736 I python : [INFO ] [GL ] Backend used
12-25 14:25:18.648 5719 5736 I python : [INFO ] [GL ] OpenGL version <b'OpenGL ES 3.1 [email protected] (GIT@I43097da1fb)'>
12-25 14:25:18.649 5719 5736 I python : [INFO ] [GL ] OpenGL vendor <b'Qualcomm'>
12-25 14:25:18.649 5719 5736 I python : [INFO ] [GL ] OpenGL renderer <b'Adreno (TM) 510'>
12-25 14:25:18.649 5719 5736 I python : [INFO ] [GL ] OpenGL parsed version: 3, 1
12-25 14:25:18.650 5719 5736 I python : [INFO ] [GL ] Texture max size <16384>
12-25 14:25:18.650 5719 5736 I python : [INFO ] [GL ] Texture max units <16>
12-25 14:25:18.717 5719 5736 I python : [INFO ] [Window ] auto add sdl2 input provider
12-25 14:25:18.718 5719 5736 I python : [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
12-25 14:25:18.772 5719 5736 I python : [INFO ] [Text ] Provider: sdl2
12-25 14:25:18.841 5719 5736 I python : Traceback (most recent call last):
12-25 14:25:18.841 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/urllib3/connectionpool.py", line 588, in urlopen
12-25 14:25:18.843 5719 5736 I python : conn = self._get_conn(timeout=pool_timeout)
12-25 14:25:18.843 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/urllib3/connectionpool.py", line 248, in _get_conn
12-25 14:25:18.844 5719 5736 I python : return conn or self._new_conn()
12-25 14:25:18.844 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/urllib3/connectionpool.py", line 816, in _new_conn
12-25 14:25:18.846 5719 5736 I python : raise SSLError("Can't connect to HTTPS URL because the SSL "
12-25 14:25:18.846 5719 5736 I python : urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.
12-25 14:25:18.846 5719 5736 I python :
12-25 14:25:18.847 5719 5736 I python : During handling of the above exception, another exception occurred:
12-25 14:25:18.847 5719 5736 I python :
12-25 14:25:18.847 5719 5736 I python : Traceback (most recent call last):
12-25 14:25:18.848 5719 5736 I python : File "./requests/adapters.py", line 449, in send
12-25 14:25:18.849 5719 5736 I python : timeout=timeout
12-25 14:25:18.849 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/urllib3/connectionpool.py", line 638, in urlopen
12-25 14:25:18.851 5719 5736 I python : _stacktrace=sys.exc_info()[2])
12-25 14:25:18.851 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/urllib3/util/retry.py", line 398, in increment
12-25 14:25:18.852 5719 5736 I python : raise MaxRetryError(_pool, url, error or ResponseError(cause))
12-25 14:25:18.852 5719 5736 I python : urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='edge.qiwi.com', port=443): Max retries exceeded with url: /payment-history/v2/persons/79896340050/payments?rows=10&startDate=2018-12-25T00%3A00%3A00%2B03%3A00&endDate=2018-12-25T23%3A59%3A59%2B03%3A00 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
12-25 14:25:18.853 5719 5736 I python :
12-25 14:25:18.853 5719 5736 I python : During handling of the above exception, another exception occurred:
12-25 14:25:18.853 5719 5736 I python :
12-25 14:25:18.853 5719 5736 I python : Traceback (most recent call last):
12-25 14:25:18.854 5719 5736 I python : File "main.py", line 155, in
12-25 14:25:18.854 5719 5736 I python : make_dict()
12-25 14:25:18.855 5719 5736 I python : File "main.py", line 136, in make_dict
12-25 14:25:18.855 5719 5736 I python : history = wallet.history(10, start_date=today, end_date=timeNow)['transactions']
12-25 14:25:18.856 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/pyqiwi/init.py", line 160, in history
12-25 14:25:18.856 5719 5736 I python : next_txn_date=next_txn_date, next_txn_id=next_txn_id)
12-25 14:25:18.857 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/pyqiwi/apihelper.py", line 118, in payment_history
12-25 14:25:18.858 5719 5736 I python : return _make_request(token, api_method, params=params)
12-25 14:25:18.858 5719 5736 I python : File "/data/user/0/org.qws.qws/files/app/_python_bundle/site-packages/pyqiwi/apihelper.py", line 42, in _make_request
12-25 14:25:18.859 5719 5736 I python : proxies=proxy, headers=headers, json=json)
12-25 14:25:18.859 5719 5736 I python : File "./requests/sessions.py", line 533, in request
12-25 14:25:18.860 5719 5736 I python : resp = self.send(prep, **send_kwargs)
12-25 14:25:18.861 5719 5736 I python : File "./requests/sessions.py", line 646, in send
12-25 14:25:18.862 5719 5736 I python : r = adapter.send(request, **kwargs)
12-25 14:25:18.862 5719 5736 I python : File "./requests/adapters.py", line 514, in send
12-25 14:25:18.863 5719 5736 I python : raise SSLError(e, request=request)
12-25 14:25:18.864 5719 5736 I python : requests.exceptions.SSLError: HTTPSConnectionPool(host='edge.qiwi.com', port=443): Max retries exceeded with url: /payment-history/v2/persons/79896340050/payments?rows=10&startDate=2018-12-25T00%3A00%3A00%2B03%3A00&endDate=2018-12-25T23%3A59%3A59%2B03%3A00 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
12-25 14:25:18.983 5719 5736 I python : Python for android ended.`
The text was updated successfully, but these errors were encountered: