Windows的Kivy包给ssl.SSLError:[SSL:CERTIFICATE_VERIFY_FAILED]

时间:2015-08-06 19:52:41

标签: python kivy pyinstaller

我正在尝试将我的kivy应用程序打包到Windows,并按照http://kivy.org/docs/guide/packaging-windows.html中的说明进行操作。这适用于touchtracer示例,但看起来该方法对我的应用程序来说还不够。该应用使用ortc(http://framework.realtime.co/messaging/#python),这会导致问题。这条线

ortc.OrtcClient().connect(app_key, private_key) 

给出错误

  

追踪(最近一次呼叫最后一次):

     

文件“”,第15行,

     

文件“C:\ Kivy190 \ Python27 \ Lib \ site-packages \ PyInstaller \ loader \ pyi_importers。   py“,第270行,在load_module中        exec(字节码,模块。字典

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ menu”,第17行,in   

     

文件“C:\ Kivy190 \ Python27 \ Lib \ site-packages \ PyInstaller \ loader \ pyi_importers。   py“,第270行,在load_module中        exec(字节码,模块。字典

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ game”,第28行,在   

     

文件“C:\ Kivy190 \ Python27 \ Lib \ site-packages \ PyInstaller \ loader \ pyi_importers。   py“,第270行,在load_module中        exec(字节码,模块。字典

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ sync”,第63行,   

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ ortc”,第381行,    连接

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ websocket._core”,l   ine 102,在create_connection中

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ websocket._core”,l   ine 250,在连接

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ websocket._http”,l   ine 68,在连接中

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ websocket._http”,l   ine 128,在_ssl_socket

中      

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ ssl”,第891行,   wrap_socket

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ ssl”,第566行,   的初始化

     

文件“C:\ Kivy190 \ TouchApp \ build \ touchtracer \ out00-PYZ.pyz \ ssl”,第788行,   do_handshake    ssl.SSLError:[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl。   C:581)

.spec文件如下所示:

# -*- mode: python -*-
from kivy.tools.packaging.pyinstaller_hooks import install_hooks
import os

def getResource(identifier, *args, **kwargs):

    if identifier == 'pygame_icon.tiff':
        raise IOError()
    return _original_getResource(identifier, *args, **kwargs)

install_hooks(globals())

a = Analysis(['card_game\\main.py'],
         pathex=['C:\\Kivy190\\TouchApp'],
         hiddenimports=[],
         runtime_hooks=None)

pyz = PYZ(a.pure)

exe = EXE(pyz,
      a.scripts,
      exclude_binaries=True,
      name='touchtracer.exe',
      debug=False,
      strip=None,
      upx=True,
      console=True )

coll = COLLECT(exe, Tree('card_game\\'), Tree([f for f in os.environ.get('KIVY_SDL2_PATH', '').split(';') if 'bin' in f][0]),
           a.binaries,
           a.zipfiles,
           a.datas,
           strip=None,
           upx=True,
           name='touchtracer')

我错过了什么吗?在使用pyinstaller之前,python代码工作正常。

0 个答案:

没有答案
相关问题