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

Internal Server Error #77

Open
thecesco opened this issue Oct 30, 2023 · 2 comments
Open

Internal Server Error #77

thecesco opened this issue Oct 30, 2023 · 2 comments

Comments

@thecesco
Copy link

thecesco commented Oct 30, 2023

Hi Andrea,
i'm getting an error on "get your code" step:
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Here the log:

6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[11:31:50] INFO: Smarter file already exist and contain some data.
[11:31:50] INFO: Setup config file...
 * Serving Flask app 'bticino'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5588
 * Running on http://172.30.33.3:5588
Press CTRL+C to quit
[2023-10-30 11:32:10,124] ERROR in app: Exception on /callback [GET]
Traceback (most recent call last):
  File "/hassio_bticino_smarter/bticino.py", line 299, in get_plants
    plants = json.loads(response.text)['plants']
             ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'plants'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hassio_bticino_smarter/bticino.py", line 744, in callback
    my_plants=get_plants(access_token)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hassio_bticino_smarter/bticino.py", line 307, in get_plants
    print("[Errno {0}] {1}".format(e.errno, e.strerror))
                                   ^^^^^^^
AttributeError: 'KeyError' object has no attribute 'errno'
192.168.178.85 - - [30/Oct/2023 11:32:10] "GET /callback?code=blablabla HTTP/1.1" 500 -
@Luca1996O
Copy link

Luca1996O commented Nov 21, 2023

Same issue here. Same lines error.

Any solution, @andrea-mattioli ?

@engal89
Copy link

engal89 commented Nov 25, 2023

I had a similar error. I go to Legrand API web console (https://developer.legrand.com/) and i see that my secret was expired. I generate a new one and simply replace the old one in HA configuration. Maybe it can help to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants