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

'CarModel' object has no attribute 'max_elec_consumption' #1019

Open
JensDeLeersnyder opened this issue Jan 1, 2025 · 0 comments
Open

'CarModel' object has no attribute 'max_elec_consumption' #1019

JensDeLeersnyder opened this issue Jan 1, 2025 · 0 comments

Comments

@JensDeLeersnyder
Copy link

JensDeLeersnyder commented Jan 1, 2025

Describe the bug
When I Try to register my car it seems like my model has no max_elec_consumption attribute, also my model is not in car models, but this is already requested in the following PR
#1018

To Reproduce
Steps to reproduce the behavior:

  1. Start a docker container with the given command.
  2. Set the config of the car.
  3. submit and get a successful login.
  4. Follow the instructions on Connection to PSA.
  5. Get the code from the network tab and fill it in.
  6. Then I see the error 'CarModel' object has no attribute 'max_elec_consumption'.
  7. Logs also display car model cannot be found, Added Peugeot E-308 Allure to car_models.yml #1018 .
  8. This issue persist after recreate config.
    Config file
{
    "abrp": {
        "abrp_enable_vin": [],
        "token": ""
    },
    "client_id": "****",
    "client_secret": "***",
    "co2_signal_api": null,
    "country_code": "BE",
    "customer_id": "***",
    "proxies": {
        "http": "",
        "https": ""
    },
    "realm": "clientsB2CPeugeot",
    "refresh_token": "***",
    "remote_refresh_token": null,
    "weather_api": null
}% 

Environment (please complete the following information):

  • OS: Fedora Linux 40
  • Run in container using the docker engine
  • Peugeot E-308 Allure 2024
  • Application version: Commit: 0bbd8a1, Main branch

Additional context
log from application:

2025-01-01 15:33:18,674 :: WARNING :: Can't get car model, please report an issue on github with your car model and first ten letter of your VIN : VR3FMZKW3R
2025-01-01 15:33:18,674 :: ERROR :: finish_oauth:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/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.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 114, in connect
res = self.psacc.get_vehicles()
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 142, in get_vehicles
self.vehicles_list.add(Car(vehicle.vin, vehicle.id, vehicle.brand, vehicle.label))
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/model/car.py", line 28, in __init__
self.max_elec_consumption = max_elec_consumption or model.max_elec_consumption # kwh/100Km
AttributeError: 'CarModel' object has no attribute 'max_elec_consumption'
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

1 participant