python - Tweepy error after turned to .exe -
so finished writing tkinter program in python, works no errors when turned .exe getting error :
file "tweepy\binder.pyc", line 239, in _call file "tweepy\binder.pyc", line 189, in execute tweepy.error.tweeperror: failed send request: [errno 2] no such file or directory
everything works fine in .py , no errors occure , can't find solutions on internet please. can please me haven't found answers !!
ok solved own problem it's solution managed find out myself , might not best works going explain step step else has same problem does'nt have go through i've been through : go tweepy folder , find binder.py open , in find :
try: resp = self.session.request(self.method, full_url, data=self.post_data, timeout=self.api.timeout, auth=auth, proxies=self.api.proxy, )
then add verify='cacert.pem' @ end looks :
try: resp = self.session.request(self.method, full_url, data=self.post_data, timeout=self.api.timeout, auth=auth, proxies=self.api.proxy, verify='cacert.pem')
save ,now need modify binder.pyc because it's py2exe uses when compiling , create new script , in type :
import py_compile py_compile.compile('path_to_binder.py')
(it better backup binder.py , binder.pyc before modifications)
now put script , binder.py (modded one) in same folder (the path in script must binder.py in folder) run script
take generated binder.pyc , put in tweepy folder old binder.pyc was.
now run py2exe , when done find 'cacert.pem' , place in 'dist' folder .exe , run .exe , should work perfectly.
Comments
Post a Comment