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

-r crash the application #54

Closed
Flodu31 opened this issue Mar 26, 2021 · 2 comments
Closed

-r crash the application #54

Flodu31 opened this issue Mar 26, 2021 · 2 comments

Comments

@Flodu31
Copy link

Flodu31 commented Mar 26, 2021

Describe the bug
When adding the -r in the launch command, the application crash

To Reproduce
Steps to reproduce the behavior:

  1. what command did you use
    /usr/local/bin/psa_car_controller -l 10.0.253.5 -f config.json -c charge_config.json -r
  2. when the bug append ?
    when adding -r parameter
  3. Does it persist after restarting the program?
    yes

Config file
Give the anonymize content of the config file

Environment (please complete the following information):

  • OS: [e.g. Windows]
    Pi
  • Android app Version [e.g. 26.0]
    28
  • Brand and model of car
    Peugeot e2008
  • Application version (commit number, branch)
    Last one

Additional context
Error log:

`
psa_remote@FLOAPP-PEUGEOT:~ $ /usr/local/bin/psa_car_controller -l 10.0.253.5 -f config.json -c charge_config.json -r
2021-03-26 09:15:26,573 :: INFO :: server start
2021-03-26 09:15:27,351 :: INFO :: {'VIN': {'id': 'id'}}
2021-03-26 09:15:28,052 :: INFO :: ask state to VIN
2021-03-26 09:15:28,228 :: INFO :: Connected with result code {'session present': 0}
2021-03-26 09:15:28,230 :: INFO :: subscribe to psa/RemoteServices/to/cid/AP-/#
2021-03-26 09:15:28,231 :: INFO :: subscribe to psa/RemoteServices/events/MPHRTServices/VIN
2021-03-26 09:15:28,379 :: INFO :: {"access_token": "token", "customer_id": "AP-", "correlation_id": "", "req_date": "2021-03-26T08:15:28Z", "vin": "VIN", "req_parameters": {"action": "state"}}
2021-03-26 09:15:28,600 :: INFO :: mqtt msg psa/RemoteServices/to/cid/AP-/VehicleState/ProcessManagement b'{"process_date":"2021-03-26T08:15:28Z","vin":"VIN","correlation_id":"","process_code":"900","process_message":"Your request has been accepted and is being processed"}'
2021-03-26 09:15:28,622 :: INFO :: mqtt msg psa/RemoteServices/to/cid/AP-/VehicleState b'{"resp_date":"2021-03-26T08:15:28Z","vin":"VIN","correlation_id":"","return_code":"0","resp_data":{"date":"2021-03-26T08:14:58Z","etat_res_elec":5,"precond_state":{"available":1,"programs":{"program1":{"hour":8,"minute":5,"on":0,"day":[1,1,1,1,1,0,0]},"program2":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program3":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]},"program4":{"hour":34,"minute":7,"on":0,"day":[0,0,0,0,0,0,0]}},"asap":0,"status":0,"aff":1},"charging_state":{"program":{"hour":22,"minute":30},"available":1,"remaining_time":0,"rate":0,"cable_detected":1,"soc_batt":90,"autonomy_zev":308,"type":0,"aff":1,"hmi_state":0,"mode":2},"vin":"VIN","reason":6,"signal_quality":2,"sev_stop_date":"2021-03-26T08:14:54Z","fds":["NDR01","NAE01","NBM01","NCG01","NAO01","NAS01"],"sev_state":1,"obj_counter":14,"privacy_customer":0,"privacy_applicable":0,"privacy_applicable_max":2,"superlock_state":0}}'
2021-03-26 09:15:28,818 :: ERROR :: Traceback (most recent call last):
File "/usr/local/src/psa_car_controller/ChargeControl.py", line 53, in start
res = self.psacc.get_vehicle_info(self.vin)
File "/usr/local/src/psa_car_controller/MyPSACC.py", line 197, in get_vehicle_info
self.record_info(vin, res)
File "/usr/local/src/psa_car_controller/MyPSACC.py", line 476, in record_info
longitude = status.last_position.geometry.coordinates[0]
AttributeError: 'NoneType' object has no attribute 'geometry'

2021-03-26 09:15:28,821 :: INFO :: save config change
2021-03-26 09:15:29,763 :: INFO :: update_data

  • Running on http://10.0.253.5:5000/ (Press CTRL+C to quit)
    10.0.5.26 - - [26/Mar/2021 09:15:35] "GET / HTTP/1.1" 200 -
    10.0.5.26 - - [26/Mar/2021 09:15:35] "GET /_dash-layout HTTP/1.1" 200 -
    10.0.5.26 - - [26/Mar/2021 09:15:35] "GET /_dash-dependencies HTTP/1.1" 200 -
    Exception on /get_vehicleinfo/VIN [GET]
    Traceback (most recent call last):
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/usr/local/src/psa_car_controller/web/callback.py", line 50, in get_vehicle_Info
    response=json.dumps(myp.get_vehicle_info(vin).to_dict(), default=str),
    File "/usr/local/src/psa_car_controller/MyPSACC.py", line 197, in get_vehicle_info
    self.record_info(vin, res)
    File "/usr/local/src/psa_car_controller/MyPSACC.py", line 476, in record_info
    longitude = status.last_position.geometry.coordinates[0]
    AttributeError: 'NoneType' object has no attribute 'geometry'
    10.0.4.101 - - [26/Mar/2021 09:15:36] "GET /get_vehicleinfo/VIN HTTP/1.1" 500 -
    Exception on /get_vehicleinfo/VIN [GET]
    Traceback (most recent call last):
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/local/src/psa_car_controller/.env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/usr/local/src/psa_car_controller/web/callback.py", line 50, in get_vehicle_Info
    response=json.dumps(myp.get_vehicle_info(vin).to_dict(), default=str),
    File "/usr/local/src/psa_car_controller/MyPSACC.py", line 197, in get_vehicle_info
    self.record_info(vin, res)
    File "/usr/local/src/psa_car_controller/MyPSACC.py", line 476, in record_info
    longitude = status.last_position.geometry.coordinates[0]
    AttributeError: 'NoneType' object has no attribute 'geometry'
    10.0.5.26 - - [26/Mar/2021 09:15:40] "GET /get_vehicleinfo/VIN HTTP/1.1" 500 -
    10.0.5.26 - - [26/Mar/2021 09:15:40] "GET /favicon.ico HTTP/1.1" 200 -
    `
@jlayec
Copy link
Contributor

jlayec commented Mar 26, 2021

feel free to use the feature-hybrid_compatibility branch. It should work. I have the same issue now an i pushed a fix in that branch already merged in by flobz.

@flobz
Copy link
Owner

flobz commented Mar 26, 2021

I close the issue, please follow the resolution on #50 .

@flobz flobz closed this as completed Mar 26, 2021
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