psa_car_controller icon indicating copy to clipboard operation
psa_car_controller copied to clipboard

AttributeError: 'PSACarController' object has no attribute 'chc' on call to /charge_control

Open medvedev opened this issue 2 years ago • 1 comments

Describe the bug Getting error AttributeError: 'PSACarController' object has no attribute 'chc' in response to HTTP request to charge_control?vin=[VIN]&percentage=80

    File "/home/username/.local/lib/python3.10/site-packages/psa_car_controller/web/view/views.py", line 215, in get_charge_control
    charge_control = APP.chc.get(vin)
    AttributeError: 'PSACarController' object has no attribute 'chc'

To Reproduce Steps to reproduce the behavior:

  1. what command did you use
    > psa-car-controller
  2. when the bug append ?
    On GET request to charge_control?vin=[VIN]&percentage=80
  3. Does it persist after restarting the program? YES
  4. Does it persist after recreate config by going to http://server_address:port/config? YES

Config file

{
    "abrp": {
        "abrp_enable_vin": [
            "VR3UHZK********"
        ],
        "token": ""
    },
    "client_id": "1eebc2d5-5df3-459b-a624-20abfcf82530",
    "client_secret": "********",
    "co2_signal_api": null,
    "country_code": "PT",
    "customer_id": "*********",
    "proxies": {
        "http": "",
        "https": ""
    },
    "realm": "clientsB2CPeugeot",
    "refresh_token": "*********",
    "remote_refresh_token": "*********",
    "weather_api": "*********"
}

Environment (please complete the following information):

  • OS: [e.g. Windows] Linux: Pop!_OS
  • Brand and model of car: Peugeot e-208
  • Application version: 3.0.4
  • Log from http://server_address:port/log and browser console log will be attached separately

Additional context Add any other context about the problem here.

medvedev avatar Sep 20 '22 17:09 medvedev

server.log

medvedev avatar Sep 20 '22 17:09 medvedev

hello, if it can be useful to you too I have this error. I scrupulously checked the logs and noticed that the otp code was no longer accepted at this point I redid the SMS procedure and now it works

flash4it avatar Oct 14 '22 13:10 flash4it