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

BMW-SOC-Module: fix authentication #2836

Merged
merged 4 commits into from
Apr 29, 2024
Merged

BMW-SOC-Module: fix authentication #2836

merged 4 commits into from
Apr 29, 2024

Conversation

rleidner
Copy link
Contributor

repair authentication issue

@rleidner
Copy link
Contributor Author

Wäre gut wenn der PR bald in den master/nightly kommt, damit die BMW-Fahrer das testen können.

@Chringbay
Copy link

Chringbay commented Apr 28, 2024

Hi!
Danke, dass du dich darum gekümmert hast!

Ich habe die Datei i3soc.py auf meiner Stand-alone (Stable - 1.9.303) ersetzt und bekomme folgende Meldungen:
(die Anmeldung scheint zu funktionieren, mit falschen Anmeldedaten bekomme ich dazu Fehlermeldungen)

Hast du eine Idee woran es liegt? Brauche ich das Nightly-Build?
urllib3 ist auf Version 2.0.7 und chardet auf 5.2.0 (für Python 3)

`2024-04-28 20:14:53: PID: 5864: Lp1: timer = 1 (LV1) at 77 main modules/soc_i3/main.sh
2024-04-28 20:14:43: PID: 4524: Lp1: Nothing to do yet. Incrementing timer. (LV1) at 81 main modules/soc_i3/main.sh
2024-04-28 20:14:43: PID: 4524: Lp1: timer = 0 (LV1) at 77 main modules/soc_i3/main.sh
FileNotFoundError: [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json'
tf = open(storeFile, 'w', encoding='utf-8')
File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 104, in write_store
write_store()
File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 430, in main
main()
File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 459, in
Traceback (most recent call last):

During handling of the above exception, another exception occurred:

FileNotFoundError: [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json'
tf = open(storeFile, 'w', encoding='utf-8')
File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 100, in write_store
Traceback (most recent call last):
Request failed
write_store_file: Exception [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json'
load_store: store file not found, new authentication required
RequestsDependencyWarning)
/usr/lib/python3/dist-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
2024-04-28 20:14:35: PID: 3373: Lp1: SoC: 0 (LV1) at 119 main /var/www/html/openWB/modules/soc_i3/main.sh
2024-04-28 20:14:35: PID: 3373: Lp1: Requesting SoC (LV1) at 101 main /var/www/html/openWB/modules/soc_i3/main.sh
2024-04-28 20:14:35: PID: 3373: Lp1: timer = 20005 (LV1) at 77 main /var/www/html/openWB/modules/soc_i3/main.sh
2024-04-28 20:14:33: PID: 3097: Lp1: Nothing to do yet. Incrementing timer. (LV1) at 81 main modules/soc_i3/main.sh`

@rleidner
Copy link
Contributor Author

rleidner commented Apr 28, 2024

Hi! Danke, dass du dich darum gekümmert hast!

Ich habe die Datei i3soc.py auf meiner Stand-alone (Stable - 1.9.303) ersetzt und bekomme folgende Meldungen: (die Anmeldung scheint zu funktionieren, mit falschen Anmeldedaten bekomme ich dazu Fehlermeldungen)

Hast du eine Idee woran es liegt? Brauche ich das Nightly-Build? urllib3 ist auf Version 2.0.7 und chardet auf 5.2.0 (für Python 3)

`2024-04-28 20:14:53: PID: 5864: Lp1: timer = 1 (LV1) at 77 main modules/soc_i3/main.sh 2024-04-28 20:14:43: PID: 4524: Lp1: Nothing to do yet. Incrementing timer. (LV1) at 81 main modules/soc_i3/main.sh 2024-04-28 20:14:43: PID: 4524: Lp1: timer = 0 (LV1) at 77 main modules/soc_i3/main.sh FileNotFoundError: [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json' tf = open(storeFile, 'w', encoding='utf-8') File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 104, in write_store write_store() File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 430, in main main() File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 459, in Traceback (most recent call last):

During handling of the above exception, another exception occurred:

FileNotFoundError: [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json' tf = open(storeFile, 'w', encoding='utf-8') File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 100, in write_store Traceback (most recent call last): Request failed write_store_file: Exception [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json' load_store: store file not found, new authentication required RequestsDependencyWarning) /usr/lib/python3/dist-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version! 2024-04-28 20:14:35: PID: 3373: Lp1: SoC: 0 (LV1) at 119 main /var/www/html/openWB/modules/soc_i3/main.sh 2024-04-28 20:14:35: PID: 3373: Lp1: Requesting SoC (LV1) at 101 main /var/www/html/openWB/modules/soc_i3/main.sh 2024-04-28 20:14:35: PID: 3373: Lp1: timer = 20005 (LV1) at 77 main /var/www/html/openWB/modules/soc_i3/main.sh 2024-04-28 20:14:33: PID: 3097: Lp1: Nothing to do yet. Incrementing timer. (LV1) at 81 main modules/soc_i3/main.sh`

Das Problem scheint hier zu sein:
FileNotFoundError: [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json
Die Datei liegt in der ramdisk (env var RAMDISKDIR) und nicht in 'undefined'
Wie startest Du den Abruf?
Der Pfad wird in der openwb Umgebung bzw. in main.sh gesetzt.
EDIT: in main.sh hattennoch enige export statements gefehlt.
Ich habe das korrigiert.

Copy link
Collaborator

@benderl benderl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitte die Anmerkungen aus openWB/core#1589 beachten.

@rleidner
Copy link
Contributor Author

Bitte die Anmerkungen aus openWB/core#1589 beachten.: ist comitted.

@rleidner rleidner requested a review from benderl April 29, 2024 10:51
@benderl benderl merged commit f762494 into snaptec:master Apr 29, 2024
1 check passed
@joerki16
Copy link

Die Fehlermeldung existiert weiter im letzten nightly 1.9.304.0 (2024-04-29 15:23:47 +0200 [f762494] )

FileNotFoundError: [Errno 2] No such file or directory: 'undefined/soc_i3_cp1.json'
tf = open(storeFile, 'w', encoding='utf-8')
File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 113, in write_store
write_store()
File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 435, in main
main()
File "/var/www/html/openWB/modules/soc_i3/i3soc.py", line 464, in

@rleidner
Copy link
Contributor Author

Right and thanks for the heads up.
It worked in the test but not in the real environment - sorry.
There was still an issue to get environment variables into the soc module.
This is fixed now and PR created.

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

Successfully merging this pull request may close these issues.

4 participants