Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic gTTS library usage causes RuntimeError in Python 3.7 #213

Closed
macelux opened this issue Jan 24, 2020 · 10 comments
Closed

Basic gTTS library usage causes RuntimeError in Python 3.7 #213

macelux opened this issue Jan 24, 2020 · 10 comments
Labels

Comments

@macelux
Copy link

macelux commented Jan 24, 2020

I am using python 3.7, and i have successfully installed gTTS but i get this error when i run this simple code

from gtts import gTTS
tts = gTTS('hello')

https://stackoverflow.com/questions/59888785/basic-gtts-library-usage-causes-runtimeerror-in-python-3-7

@pndurette pndurette added the bug label Jan 24, 2020
@pndurette
Copy link
Owner

Hi @macelux. Indeed looks like a bug! Will fix and add tests, mostly likely this weekend.
Thanks for asking on SO too, great response over there!

@macelux
Copy link
Author

macelux commented Jan 24, 2020

Ok. Will check back this weekend.

pndurette added a commit that referenced this issue Jan 26, 2020
Iterate on a copy of locals() instead. Fixes #213
@pndurette
Copy link
Owner

@macelux, fixed in gTTS 2.1.1, just released! Thanks for the report.

@macelux
Copy link
Author

macelux commented Jan 27, 2020

gTTS 2.1.1 isn't available on pip3 yet.

@pndurette
Copy link
Owner

@macelux It should be! 😄
Perhaps you haven't done --upgrade in your pip command?
https://pypi.org/project/gTTS/

@macelux
Copy link
Author

macelux commented Jan 27, 2020

Still the same even after - -upgrade

@pndurette
Copy link
Owner

Hmm that's odd. Care to share your command and its output?

@macelux
Copy link
Author

macelux commented Jan 27, 2020

i did this pip3 install --upgrade pip and this pip3 install gTTS and here is the result,
Requirement already satisfied: gTTS in /usr/local/lib/python3.7/dist-packages (2.1.0) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from gTTS) (1.12.0) Requirement already satisfied: gtts-token>=1.1.3 in /home/mac/.local/lib/python3.7/site-packages (from gTTS) (1.1.3) Requirement already satisfied: beautifulsoup4 in /home/mac/.local/lib/python3.7/site-packages (from gTTS) (4.8.2) Requirement already satisfied: click in /home/mac/.local/lib/python3.7/site-packages (from gTTS) (7.0) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from gTTS) (2.21.0) Requirement already satisfied: soupsieve>=1.2 in /home/mac/.local/lib/python3.7/site-packages (from beautifulsoup4->gTTS) (1.9.5)

@pndurette
Copy link
Owner

Ahh I see! It's gTTS that needs --upgrade not pip in this case.
Try: pip3 install --upgrade gTTS. Should do the trick! :D

@macelux
Copy link
Author

macelux commented Jan 28, 2020

Ahh I see! It's gTTS that needs --upgrade not pip in this case.
Try: pip3 install --upgrade gTTS. Should do the trick! :D

Thanks. It worked!!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants