flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
391 stars 199 forks source link

Two tabs for one vehicle cause en error and no total mileage #526

Closed TroisSix closed 1 year ago

TroisSix commented 1 year ago

Hi

Thank you for your great plugin, that's a really great plugin you developed, and I use it everyday now for a few months now :)

I discovered today after the update in 3.0.9 and 3.0.10 some issues:

I also have issues with the other tabs: no map, no charge tab, etc, so I cannot use it for now.

Environment (please complete the following information):

Logs when starting with --web-conf

Traceback (most recent call last):
  File "/home/MY_USER/.local/bin/psa-car-controller", line 8, in <module>
    sys.exit(main())
  File "/home/MY_USER/.local/lib/python3.9/site-packages/psa_car_controller/__main__.py", line 20, in main
    app.load_app()
  File "/home/MY_USER/.local/lib/python3.9/site-packages/psa_car_controller/psacc/application/car_controller.py", line 94, in load_app
    logger.info(str(self.myp.get_vehicles()))
  File "/home/MY_USER/.local/lib/python3.9/site-packages/psa_car_controller/psacc/application/psa_client.py", line 139, in get_vehicles
    self.vehicles_list.add(Car(vehicle.vin, vehicle.id, vehicle.brand, vehicle.label))
  File "/home/MY_USER/.local/lib/python3.9/site-packages/psa_car_controller/psacc/model/car.py", line 19, in __init__
    model = CarModelRepository().find_model_by_vin(self.vin)
  File "/home/MY_USER/.local/lib/python3.9/site-packages/psa_car_controller/psacc/utils/utils.py", line 37, in __call__
    cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
  File "/home/MY_USER/.local/lib/python3.9/site-packages/psa_car_controller/psacc/repository/car_model.py", line 21, in __init__
    self.models: List[CarModel] = yaml.load(models)
  File "/home/MY_USER/.local/lib/python3.9/site-packages/ruamel/yaml/main.py", line 434, in load
    return constructor.get_single_data()
  File "/home/MY_USER/.local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 119, in get_single_data
    node = self.composer.get_single_node()
  File "/home/MY_USER/.local/lib/python3.9/site-packages/ruamel/yaml/composer.py", line 81, in get_single_node
    raise ComposerError(
ruamel.yaml.composer.ComposerError: expected a single document in the stream
  in "<unicode string>", line 1, column 1:
    !ElecModel
    ^ (line: 1)
but found another document
  in "<unicode string>", line 8, column 1:
    - !ElecModel
    ^ (line: 8)

Thank you all for your help. First time the plugin is not working for me for several months now :'(

mdkeil commented 1 year ago

fixed with 3.0.11, but maybe with additional new bugs.. If you don't need mileage/odometer at the moment, stay to 3.0.8.

TroisSix commented 1 year ago

Thank you @flobz for your very quick release that perfectly resolve the bugs I got (double conf & total mileage) ^^

Also, do you have an idea why I still have nothing in the tabs Summary, Trips, Charge & Map? What should I do?

TroisSix commented 1 year ago

And preconditioning/VIN/1 is also not working, perhaps a known bug with 3.0.11? Il will continue the shitty application MyOpel ^^

Edit: you just resolved the bug with the preconditioning in the 3.0.12, Trips and Map are also working, thank you ^^