ardevd / jlrpy

Python library for interacting with the JLR Remote Car API
MIT License
84 stars 29 forks source link

Login error just appeared #129

Closed RodLaird closed 6 months ago

RodLaird commented 6 months ago

Have had to update some other parts of my scripts but generally everything has been working fine. Now login is throwing an error after authentication:

File "C:\Users\Study\AppData\Local\Programs\Python\Python312\Lib\site-packages\jlrpy.py", line 188, in _login_user self.user_id = user_data['userId'] TypeError: 'NoneType' object is not subscriptable

Am I doing something wrong? Checked I had latest installed

\Users\Study>pip3 install jlrpy Requirement already satisfied: jlrpy in c:\users\study\appdata\local\programs\python\python312\lib\site-packages (1.6.0) Requirement already satisfied: requests>=2.26.0 in c:\users\study\appdata\local\programs\python\python312\lib\site-packages (from jlrpy) (2.31.0) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\study\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.26.0->jlrpy) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in c:\users\study\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.26.0->jlrpy) (3.6) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\study\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.26.0->jlrpy) (2.2.0) Requirement already satisfied: certifi>=2017.4.17 in c:\users\study\appdata\local\programs\python\python312\lib\site-packages (from requests>=2.26.0->jlrpy) (2024.2.2)

So... ....heeeeelp?

ardevd commented 6 months ago

Hi there.

I just tried logging in with the latest version of jlrpy. It works fine here. Please make sure you have the latest version.

RodLaird commented 6 months ago

I'm an idiot! I misread the version number and thought I was current. Update fixed it of course Very grateful for your work!!!

wawibu commented 4 months ago

I run into the same issue and can't login anymore :/

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/wawibu/.local/lib/python3.10/site-packages/jlrpy.py", line 80, in __init__
    self.connect()
  File "/home/wawibu/.local/lib/python3.10/site-packages/jlrpy.py", line 125, in connect
    self._register_device_and_log_in()
  File "/home/wawibu/.local/lib/python3.10/site-packages/jlrpy.py", line 130, in _register_device_and_log_in
    self._login_user(self.head)
  File "/home/wawibu/.local/lib/python3.10/site-packages/jlrpy.py", line 188, in _login_user
    self.user_id = user_data['userId']
TypeError: 'NoneType' object is not subscriptable

latest version should be installed

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: jlrpy in ./.local/lib/python3.10/site-packages (1.7.1)
Requirement already satisfied: requests>=2.26.0 in ./.local/lib/python3.10/site-packages (from jlrpy) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.10/site-packages (from requests>=2.26.0->jlrpy) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests>=2.26.0->jlrpy) (1.26.5)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.26.0->jlrpy) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.26.0->jlrpy) (2020.6.20)

did they changed again something or is it just me doing something wrong ?

ardevd commented 4 months ago

JLR updated their API again. I'll look into it.