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

Display Screen fails to handle Flask-gTTS failure with no internet #198

Closed
mrf345 opened this issue Jul 22, 2020 · 0 comments · Fixed by #205
Closed

Display Screen fails to handle Flask-gTTS failure with no internet #198

mrf345 opened this issue Jul 22, 2020 · 0 comments · Fixed by #205
Labels
0.9 0.9 release bug

Comments

@mrf345
Copy link
Owner

mrf345 commented Jul 22, 2020

Describe the bug
Display Screen fails to handle Flask-gTTS failure when the machine is not connected to the internet.

To Reproduce
Steps to reproduce the issue:

  1. Disconnect your internet.
  2. Go to the display screen.
  3. Checkout the JS Console.

Please complete the following information:

  • Operating System (OS): Windows 10
  • Browser: N\A
  • FQM Version: 0.8.1

Error:

Traceback (most recent call last):
  File "C:\Program Files\Python37-32\lib\site-packages\flask\app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Program Files\Python37-32\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Program Files\Python37-32\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Program Files\Python37-32\lib\site-packages\flask\_compat.py", line 35, in reraise
    raise value
  File "C:\Program Files\Python37-32\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Program Files\Python37-32\lib\site-packages\flask\app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Program Files\Python37-32\lib\site-packages\flask_gtts\main.py", line 148, in wrapper
    return function(*args, **kwargs)
  File "C:\Program Files\Python37-32\lib\site-packages\flask_gtts\main.py", line 160, in gtts_route
    return jsonify(mp3=self.say(language, text)
  File "C:\Program Files\Python37-32\lib\site-packages\flask_gtts\main.py", line 102, in say
    generator.save(file_path)
  File "C:\Program Files\Python37-32\lib\site-packages\gtts\tts.py", line 249, in save
    self.write_to_fp(f)
  File "C:\Program Files\Python37-32\lib\site-packages\gtts\tts.py", line 194, in write_to_fp
    str(e))
gtts.tts.gTTSError: Connection error during token calculation: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0672D150>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed'))
@mrf345 mrf345 added bug 0.9 0.9 release labels Jul 22, 2020
mrf345 added a commit that referenced this issue Aug 30, 2020
Fix handle Flask-gTTS errors with no internet, Resolves #198
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.9 0.9 release bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant