TypeError: stat: can't specify None for path argument
Closed this issue · 3 comments
Hi.
When I try to use the program (google_speech -l en "Hello $USER, it is $(date)"
or any of the usage examples) I get this:
TypeError: stat: can't specify None for path argument
Traceback (most recent call last):
File "/usr/bin/google_speech", line 11, in <module>
sys.exit(cl_main())
File "/usr/lib/python3.4/site-packages/google_speech/__init__.py", line 299, in cl_main
main(args.speech, args.lang, args.sox_effects)
File "/usr/lib/python3.4/site-packages/google_speech/__init__.py", line 253, in main
Speech(text, lang).play(sox_effects)
File "/usr/lib/python3.4/site-packages/google_speech/__init__.py", line 137, in play
segment.play(sox_effects)
File "/usr/lib/python3.4/site-packages/google_speech/__init__.py", line 203, in play
audio_data = self.download(real_url)
File "/usr/lib/python3.4/site-packages/google_speech/__init__.py", line 246, in download
timeout=3.1)
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 342, in send
self.cert_verify(conn, request.url, verify, cert)
File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 187, in cert_verify
if not os.path.isdir(cert_loc):
File "/usr/lib64/python3.4/genericpath.py", line 42, in isdir
st = os.stat(s)
TypeError: stat: can't specify None for path argument
I think I have the necessary requirements installed (Python 3.4 and SoX with MP3 support). I have installed the program with PIP and from source with identical results. I'm using openSUSE Tumbleweed. Any hints?
Greetings.
Hi,
It seems the requests library can not find on your system a CA store needed to validate https URLs.
The best solution would be to install the certify package with pip (pip3 install certify
), which will install recent root certificates that will then be properly detected by requests.
Please tell me if that fixes it
Hi.
Yes, once installed certify it works fine. Thank you very much.
Greetings.
Great