pndurette / gTTS

Python library and CLI tool to interface with Google Translate's text-to-speech API
http://gtts.readthedocs.org/
MIT License
2.32k stars 361 forks source link

Connection error during token calculation [SSL: CERTIFICATE_VERIFY_FAILED] #132

Closed Govindmallurwar closed 4 years ago

Govindmallurwar commented 6 years ago

Traceback (most recent call last): File "D:/FD_caseStudy/FaceD/TextToSpeech/speech.py", line 4, in tts.save("hello.mp3") File "C:\Python27\lib\site-packages\gtts\tts.py", line 247, in save self.write_to_fp(f) File "C:\Python27\lib\site-packages\gtts\tts.py", line 192, in write_to_fp str(e)) gTTSError: Connection error during token calculation: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

getting below error while using gTTs. could someone help me on this

installed modules on my machine Package Version


-curses 2.2 aafigure 0.5 alabaster 0.7.6 alembic 0.7.6 anyconfig 0.9.7 apipkg 1.4 apptools 4.3.0 astroid 1.3.6 astropy 1.0.3 atom 0.3.10 Babel 1.3 backports.datetime-timestamp 1.0.2.dev0 backports.functools-lru-cache 1.0.2.dev0 backports.method-request 1.0.1.dev0 backports.shutil-get-terminal-size 1.0.0 backports.ssl-match-hostname 3.4.0.2 Beaker 1.7.0 BeautifulSoup 3.2.1 beautifulsoup4 4.3.2 blinker 1.4.dev0 blockcanvas 4.0.3 blosc 1.2.7 bloscpack 0.7.2 Bottleneck 1.0.0 bs4 0.0.1 bunch 1.0.1 CacheControl 0.11.5 cchardet 0.3.5 cdecimal 2.3 certifi 2015.4.28 cffi 1.1.2 chaco 4.5.0 chardet 2.3.0 click 6.7 codetools 4.2.0 colorama 0.3.3 configobj 5.0.6+xy.1 configparser 3.5.0b2 cov-core 1.15.0 coverage 3.7.1 cryptography 1.0.dev1 cssselect 0.9.1 cvxopt 1.1.7 cvxpy 0.2.24 cx-Freeze 4.3.4 cyordereddict 0.2.3.dev7 Cython 0.22.1 cytoolz 0.7.3 datrie 0.7.1.dev37 decorator 3.4.2 distlib 0.2.0 distribute 0.7.3 docutils 0.12 docutils-aafigure 0.3 ecdsa 0.13.1.dev0 ecos 1.1.1 ed25519ll 0.6 egenix-mx-base 3.2.8 enable 4.5.1 enaml 0.9.8 enamllexer 0.0.0 encore 0.6.0 enum34 1.0.4 envisage 4.4.0 ets 4.4.4 etsdevtools 4.0.2 etsproxy 0.1.2 execnet 1.3.1.dev11+n2a4d009856d7 Fabric 1.10.2 fabric-virtualenv 0.2.1 faulthandler 2.4 ffnet 0.8.0 Flask 1.0.2 fonttools 2.4 formlayout 1.0.15 funcsigs 0.4 futures 3.0.3 GDAL 1.11.2 gevent 1.0.2 gevent-websocket 0.9.5 graphcanvas 4.0.2 greenlet 0.4.7 grin 1.2.1+xy1 gTTS 2.0.1 gTTS-token 1.1.1 guidata 1.6.1 guiqwt 2.3.2 h5py 2.5.0 html5lib 0.99999 idna 2.1.dev1 ipaddress 1.0.7 ipdb 0.8.1 ipdbplugin 1.4.2 ipython 2.4.1 itsdangerous 0.24 jaraco.apt 1.0 jaraco.classes 1.2 jaraco.collections 1.1 jaraco.context 1.3 jaraco.functools 1.3 jaraco.structures 1.0 jaraco.text 1.4 jaraco.ui 1.3.1 jaraco.windows 3.4 jdcal 1.0 jedi 0.9.0 Jinja2 2.10 keyring 5.3 kiwisolver 0.1.3 libnacl 1.4.3 linecache2 1.0.0 lockfile 0.10.2.post7 logilab-common 0.63.2 lxml 3.4.4 mahotas 1.3.0 Mako 1.0.1 MarkupSafe 0.23 matplotlib 1.4.3 mayavi 4.4.2 MDP 3.3 mock 1.0.1 modernize 0.4 more-itertools 2.3.dev0 ndg-httpsclient 0.4.0 netCDF4 1.1.8 netifaces 0.10.4 networkx 1.9.1 nose 1.3.7 nose-cov 1.6 nose-fixes 1.3 numexpr 2.4.3 numpy 1.9.2 numpydoc 0.6.dev0 oauthlib 0.7.3.dev0 objgraph 2.0.1.dev0 opencv-python 2.4.11 openpyxl 2.2.4 packaging 15.2 pandas 0.16.2 paramiko 1.15.2 pathlib 1.0.1 patsy 0.3.0 pbr 0.11.1 pdfrw 0.2 pep8 1.6.2 Pillow 2.8.2 pip 10.0.1 ply 3.6 Polygon 2.0.5 pp 1.6.4 psutil 3.0.1 py 1.4.30 py2exe 0.6.9 pyamg 2.2.1 pyasn1 0.1.8 pyasn1-modules 0.0.6 PyAudio 0.2.11 pycares 0.7.0 pycparser 2.14 pycrypto 2.6.1 pycurl 7.19.5.1 pydicom 0.9.9 pyemf 2.0.0 pyface 4.6.0.dev13 pyflakes 0.9.2 Pygments 2.0.2 pygraphviz 1.3.dev0 pyhdf 0.8.3 PyHyphen 2.0.5 PyICU 1.9.2+xy.1 PyJWT 1.3.1.dev2 pylint 1.4.3 pymc 2.3.4 pyMinuit 1.2.1 pyodbc 3.0.11b7 PyOpenGL 3.1.0 PyOpenGL-accelerate 3.1.0 pyOpenSSL 0.15.1 pyparallel 0.2 pyparsing 2.0.3 pyPdf 1.13 PyPDF2 1.24 PyQt4 4.11.3 pyreadline 2.0.6+xy.1 pyserial 2.7 PyStemmer 1.3.0 pytest 2.7.3.dev0 pytest-bench 0.3.0 pytest-cache 1.0 pytest-cov 1.8.1 pytest-faulthandler 0.2.1 pytest-flakes 1.0.0 pytest-pep8 1.0.6 pytest-runner 2.5.1 pytest-xdist 1.13.dev1 python-dateutil 2.4.2 pyttsx 1.1 pytz 2015.4 PyVISA 1.7 PyWavelets 0.2.2 pywin 0.3.1 pywin32 219 pywinauto 0.4.2 PyYAML 3.11 pyzmq 14.7.0 reportlab 3.2.0 requests 2.7.0 requests-oauthlib 0.5.0 rope 0.10.2 rst2pdf 0.93 sampy 1.2.1 scandir 1.1.1.dev7 scikit-image 0.11.3 scikit-learn 0.16.1 scimath 4.1.2 scipy 0.15.1 scp 0.10.2 scs 1.1.4 seaborn 0.5.1 SendKeys 0.3 setuptools 18.0.1 simplejson 3.7.3 singledispatch 3.4.0.3 six 1.9.0 snowballstemmer 1.2.1.dev1 SpeechRecognition 3.8.1 Sphinx 1.3.2 sphinx-rtd-theme 0.1.8 sphinxcontrib-aafig 1.0 sphinxcontrib-plantuml 0.6 spyder 2.3.5.2 SQLAlchemy 1.0.6 statsmodels 0.6.1 svg2rlg 0.3 svglib 0.6.3 sympy 0.7.6 tables 3.2.0 Tempita 0.5.2 termcolor 1.1.0 toolz 0.7.2 tornado 4.2 traceback2 1.4.0 traits 4.5.0 traitsui 4.5.1 TTFQuery 1.0.5 tts-watson 1.0.0 ujson 1.33 uncertainties 2.4.6.1 unittest2 1.0.1 urllib3 1.10.4 veusz 1.23.1 virtualenv 13.0.3 virtualenvwrapper-win 1.2.1 ViTables 2.2a1 VPython 5.74 VTK 6.20 Werkzeug 0.14.1 wheel 0.24.0 Whoosh 2.7.0 wincertstore 0.2 winpdb 1.4.8 wsaccel 0.6.2 wxPython 2.8.12.1 wxPython-common 2.8.12.1 xhtml2pdf 0.0.7.dev0 xlrd 0.9.3 xlwt 1.0.0 yappi 0.94 yg.lockfile 2.0 zc.lockfile 1.1.0

pndurette commented 6 years ago

The other issue above seems to hit this as well. Not sure what it means yet. Will have to look into it.

andriyvasylyna commented 5 years ago

hi all, I got same error, I use internal proxy with self signed CERT, that was the reason. For fix I simple add verify=False in gtts_token.py in - response = requests.get("https://translate.google.com/", verify=False)

pndurette commented 4 years ago

Closing as this is related to https://github.com/Boudewijn26/gTTS-token