kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
782 stars 240 forks source link

Kivy 2.0 not installing certifi for requests #458

Closed JohnPapps closed 4 years ago

JohnPapps commented 4 years ago

Using the latest version of kivy-ios, 8416d46fd4f70da155f62640443c30cf71a0e52f which is using Kivy 2.0 and Python 3.8, UrlRequest does not work as certifi is not installed

lib/python3.8/site-packages/kivy/network/urlrequest.py", line 220, in __init__
     import certifi
 ModuleNotFoundError: No module named 'certifi'

This is showing in the Xcode console output when running my app in the simulator at the point when I try to use UrlRequest.

JohnPapps commented 4 years ago

Environment: macOS Mojave Python 3.8.2 inside conda environment:

(kivy-ios-38) ~/src/kivy-ios$ python
Python 3.8.2 (default, Mar 26 2020, 10:43:30)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
(kivy-ios-38) ~/src/kivy-ios$ pip freeze
certifi==2020.4.5.1
chardet==3.0.4
docopt==0.6.2
future==0.18.2
idna==2.9
openstep-parser==1.5.3
pbxproj==2.5.1
Pillow==7.1.2
requests==2.23.0
urllib3==1.25.9
(kivy-ios-38) ~/src/kivy-ios$

Followed instructions in readme to create Xcode project No obvious errors. Open the project, then run in Simulator App works until it makes a network request using UrlRequest when it crashes with the tail of the stacktrace shown above. Nothing special in the request: self.req = UrlRequest(url, on_success=success, on_error=error)

JohnPapps commented 4 years ago

Workaround, (big thanks to @inclement) is to install certifi manually: $ python3 toolchain.py pip install certifi In my opinion, the ticket should remain open as certifi is a kivy dependency.

misl6 commented 4 years ago

That should be fixed via https://github.com/kivy/kivy-ios/pull/455

Zen-CODE commented 4 years ago

This issue should now be resolved with recent changes. Please update your checkout to the latest version and re-open if the issue persists.

Thanks