使用py2exe编译Python脚本时,PRAW会导致SSL错误

时间:2016-02-26 00:43:51

标签: python ssl python-requests py2exe praw

Python 2.7.11

请求2.9.1

Praw 3.4.0

我有一个使用PRAW(reddit API包装器)的python脚本,我正在尝试使用py2exe将其编译成.exe。

以下是运行.exe时出现的当前错误:

Traceback (most recent call last):
  File "MYSCRIPTNAME.py", line 263, in <module>
  File "<decorator-gen-51>", line 2, in login
  File "praw\decorators.pyc", line 78, in wrap
  File "praw\__init__.pyc", line 1455, in login
  File "<decorator-gen-8>", line 2, in request_json
  File "praw\decorators.pyc", line 116, in raise_api_exceptions
  File "praw\__init__.pyc", line 620, in request_json
  File "praw\__init__.pyc", line 451, in _request
  File "praw\__init__.pyc", line 432, in handle_redirect
  File "praw\handlers.pyc", line 146, in wrapped
  File "praw\handlers.pyc", line 56, in wrapped
  File "praw\handlers.pyc", line 102, in request
  File "requests\sessions.pyc", line 576, in send
  File "requests\adapters.pyc", line 447, in send
requests.exceptions.SSLError: [Errno 2] No such file or directory

第263行是r.login(user,pw)rr = praw.Reddit(userAgent)

在这里和其他地方搜索其他SSL问题,讨论了添加cacert.pem。我没试过就尝试了这个。

0 个答案:

没有答案