psa_car_controller icon indicating copy to clipboard operation
psa_car_controller copied to clipboard

Unexpected NoneType in psa_client.py

Open MaStr opened this issue 6 months ago • 6 comments

Describe the bug psa-car-controller stopped working. Even after upgrading to 3.6 error persists during login.

psa-car-controller_1     | 2025-11-05 07:57:31,817 :: INFO :: 192.168.56.227 - - [05/Nov/2025 07:57:31] "POST /_dash-update-component HTTP/1.1" 204 -
psa-car-controller_1     | 2025-11-05 08:00:13,060 :: INFO :: save config change
psa-car-controller_1     | 2025-11-05 08:00:25,520 :: ERROR :: finish_oauth:
psa-car-controller_1     | Traceback (most recent call last):
psa-car-controller_1     |   File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/web/view/config_oauth.py", line 56, in finish_oauth
psa-car-controller_1     |     config_views.INITIAL_SETUP.connect(code)
psa-car-controller_1     |   File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 119, in connect
psa-car-controller_1     |     res = self.psacc.get_vehicles()
psa-car-controller_1     |           ^^^^^^^^^^^^^^^^^^^^^^^^^
psa-car-controller_1     |   File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 142, in get_vehicles
psa-car-controller_1     |     for vehicle in res.embedded.vehicles:
psa-car-controller_1     |                    ^^^^^^^^^^^^
psa-car-controller_1     | AttributeError: 'NoneType' object has no attribute 'embedded'

To Reproduce Steps to reproduce the behavior:

  1. Install Service
  2. Do Login and OTP Procedure

Config file

config.json

{
    "abrp": {
        "abrp_enable_vin": [],
        "token": ""
    },
    "client_id": "xxxxxx",
    "client_secret": "xxxxxxx",
    "co2_signal_api": null,
    "country_code": "DE",
    "customer_id": "OP-ACNT200001111111",
    "proxies": {
        "http": "",
        "https": ""
    },
    "realm": "clientsB2COpel",
    "refresh_token": "xxxx-xxxx-xx-xxx-xxxxx",
    "remote_refresh_token": null,
    "weather_api": null
}

Environment (please complete the following information):

  • OS: docker , arm64, image: flobz/psa_car_controller:v3.6
  • Open Corsa
  • 3.6

Additional context Seems to started after this night.

MaStr avatar Nov 05 '25 08:11 MaStr

+1 I have exactly the same problem, occurred during the night of the 4th of November. Both my Citroën cars stopped working with PSA car controller, as there is no info coming in. Image

2025-11-05 08:30:09,513 :: INFO :: save config change

2025-11-05 08:30:09,513 :: INFO :: App version 3.6.0

2025-11-05 08:30:20,362 :: INFO :: save config change

2025-11-05 08:30:43,385 :: ERROR :: finish_oauth:

Traceback (most recent call last):

  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/web/view/config_oauth.py", line 56, in finish_oauth

    config_views.INITIAL_SETUP.connect(code)

  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 140, in connect

    app.load_app()

  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/car_controller.py", line 104, in load_app

    logger.info(str(self.myp.get_vehicles()))

                    ^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.11/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 142, in get_vehicles

    for vehicle in res.embedded.vehicles:

                   ^^^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'embedded'

Simanias avatar Nov 05 '25 08:11 Simanias

It seems to work again-- Stellantis, well done

MaStr avatar Nov 05 '25 14:11 MaStr

Here as well.

Simanias avatar Nov 05 '25 19:11 Simanias

Today, it happens again... Home Assistant tells me that there isn't any incoming data for ~5h at the moment. 😔

Sunsurfer89 avatar Nov 20 '25 22:11 Sunsurfer89

Same for me too. Is your entire PSACC website unresponsive? I don't even get the main or config page.

P.S.: the Stellantis app doesn't work here either.

HenningS81 avatar Nov 21 '25 07:11 HenningS81

Same here. But I have the feeling it has something to do with exceeding the rate limit.

Image

Simanias avatar Nov 21 '25 08:11 Simanias