1

我正在尝试在我的 kivy 应用程序中导入 ssl,但当我部署到 iOS 时它会崩溃。

它崩溃:

import ssl

这是来自设备的日志:

2013-07-31 20:13:06.215 mykivyapp[2568:907] [Springtomize]: Loading into sb-external process
2013-07-31 20:13:07.308 mykivyapp[2568:907] PythonHome is: /var/mobile/Applications/3742734C-18CB-49A5-B943-BABADBA9D26E/mykivyapp.app
2013-07-31 20:13:07.311 mykivyapp[2568:907] Initializing python
2013-07-31 20:13:07.719 mykivyapp[2568:907] Running main.pyo: /var/mobile/Applications/3742734C-18CB-49A5-B943-BABADBA9D26E/mykivyapp.app/YourApp/main.pyo
[INFO              ] Kivy v1.7.1
[INFO              ] [Factory     ] 144 symbols loaded
[DEBUG             ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG             ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG             ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[DEBUG             ] [Image       ] option <dds> ignored by config
[DEBUG             ] [Image       ] option <pygame> ignored by config
[DEBUG             ] [Image       ] option <pil> ignored by config
[DEBUG             ] [Image       ] option <gif> ignored by config
[INFO              ] [Image       ] Providers: img_imageio, img_tex (img_dds, img_pygame, img_pil, img_gif ignored)
[DEBUG             ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG             ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG             ] [Text        ] Ignored <pygame> (import error)
[INFO              ] [Text        ] Provider: sdlttf(['text_pygame'] ignored)
 Traceback (most recent call last):
   File "/Users/0/Desktop/kivy-ios/app-mykivyapp/YourApp/main.py", line 30, in <module>
   File "/Users/0/Desktop/kivy-ios/build/python/lib/python2.7/ssl.py", line 60, in <module>
     import _ssl             # if we can't import it, let the error propagate
 ImportError: No module named _ssl
2013-07-31 20:13:08.967 mykivyapp[2568:907] Application quit abnormally!
2013-07-31 20:13:09.016 mykivyapp[2568:907] Leaving
4

1 回答 1

1

正如 Mathieu Virbel在这里解释的那样,您需要找到一种在项目中导入 ssl 模块的方法。

于 2013-09-01T16:47:03.417 回答