使用PyInstaller后,Dropbox模块无法找到SSL证书

时间:2017-04-07 01:38:55

标签: python ssl dropbox python-3.5 pyinstaller

我正在尝试从我的Python-3.5代码构建一个可执行文件,该文件通过PyInstaller从Dropbox下载文件。这在运行纯Python代码时工作正常,但可执行文件似乎无法找到/冻结urllib3的ssl_.py。我无法弄清楚如何解决这个问题 - 任何帮助都将不胜感激。

Exception in Tkinter callback
Traceback (most recent call last):
  File "site-packages\urllib3\util\ssl_.py", line 308, in ssl_wrap_socket
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\dropbox\rest.py", line 226, in request
  File "site-packages\urllib3\poolmanager.py", line 244, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 600, in urlopen
  File "site-packages\urllib3\connectionpool.py", line 345, in _make_request
  File "site-packages\urllib3\connectionpool.py", line 844, in _validate_conn
  File "site-packages\urllib3\connection.py", line 326, in connect
  File "site-packages\urllib3\util\ssl_.py", line 310, in ssl_wrap_socket
urllib3.exceptions.SSLError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tkinter\__init__.py", line 1550, in __call__
  File "SIPM_v3_ATO_trace.py", line 1201, in <lambda>
    runbutton_forecast = ttk.Button(frame1, text="Execute Forecast Model", command=lambda: run_rcode())
  File "SIPM_v3_ATO_trace.py", line 557, in run_rcode
    print('Linked account: ', client.account_info())
  File "site-packages\dropbox\client.py", line 155, in account_info
  File "site-packages\dropbox\rest.py", line 317, in GET
  File "site-packages\dropbox\rest.py", line 254, in GET
  File "site-packages\dropbox\rest.py", line 232, in request
dropbox.rest.RESTSocketError: Error connecting to "https://api.dropbox.com/1/account/info": SSL certificate error: [Errno 2] No such file or directory

0 个答案:

没有答案