GithubHelp home page GithubHelp logo

Comments (7)

foges avatar foges commented on May 18, 2024

Similar issue here. I get requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

from gtts.

jhoelzl avatar jhoelzl commented on May 18, 2024

Me too!

I can suppress the error when i add the option verify=False to the requests command in the gtts_token package on line 58.

However, i am also searching for a better solution ...

from gtts.

wallygit avatar wallygit commented on May 18, 2024

Hello,
I installed gtts using "pip install gTTS" and I get the ssl error when trying the commandline utility:
gtts-cli.py "Hello" -l 'en' -o hello.mp3
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

I tried to reinstall requests and certifi but no change.
How should I try the above approach ?

r = requests.get(self.GOOGLE_TTS_URL, params=payload, headers=headers)
change to
r = requests.get(self.GOOGLE_TTS_URL, params=payload, headers=headers,verify=False)

After changing .../gTTS-master/gtts/tts.py line 114 I assume I have to rbuild the utility (?)
Simply using "pip install gTTS" again, seems to download a fresh source and my changes are ignored.
I'm not experienced with Python stuff at all, I just need to use the tool to make some text available for vison impaired. Any help highly welcome, thx.

Tried to change line 114 in /usr/lib/python3.4/site-packages/gtts/tts.py
but the error remains.

from gtts.

ruapotato avatar ruapotato commented on May 18, 2024

Work around:

in
/usr/lib/python3.4/site-packages/requests/sessions.py

change line 572 from:

        # Send the request
        r = adapter.send(request, **kwargs)

to read

        # Send the request
        kwargs['verify'] = False
        r = adapter.send(request, **kwargs)

from gtts.

wallygit avatar wallygit commented on May 18, 2024

works now, thank you very much !

from gtts.

pndurette avatar pndurette commented on May 18, 2024

Hi! gTTS 1.2.0 was released, fixing this. SSL verify is now always false, since we can live w/o it in our case.

from gtts.

souzaavi avatar souzaavi commented on May 18, 2024

After making changes use these lines of code in the file where u are using tts.save() to avoid warnings.

import urllib3

urllib3.disable_warnings()

from gtts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.