tillsteinbach / WeConnect-cli

Commandline Interface to interact with the Volkswagen WeConnect Services
MIT License
60 stars 3 forks source link

recurringTimer is None #1

Closed mdhom closed 3 years ago

mdhom commented 3 years ago

hey folks,

i get the following exception when running the cli:

Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\Scripts\weconnect-cli.exe\__main__.py", line 7, in <module>
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect_cli\weconnect_cli.py", line 142, in main
    weConnect.update()
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\weconnect.py", line 411, in update
    vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict,
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 46, in __init__
    self.update(fromDict)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 117, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 157, in updateStatus
    self.statuses[key] = className(vehicle=self, parent=self.statuses, statusId=key,
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1586, in __init__
    super().__init__(vehicle=vehicle, parent=parent, statusId=statusId, fromDict=fromDict, fixAPI=fixAPI)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 312, in __init__
    self.update(fromDict=fromDict)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1598, in update
    self.timers[climatizationTimerDict['id']] = ClimatizationTimer.Timer(
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1636, in __init__
    self.update(fromDict)
  File "C:\Users\MaxDhom\AppData\Roaming\Python\Python39\site-packages\weconnect\elements.py", line 1660, in update
    self.recurringTimer.enabled = False
AttributeError: 'NoneType' object has no attribute 'enabled'

It doesn't make any difference wether i run it with list argument or without. Would be glad to get some help here!

tillsteinbach commented 3 years ago

Can you please check if version 0.5.3 fixes your problem?

mdhom commented 3 years ago

yes, thank you. running --upgrade worked. i am just wondering why it didn't install the latest version right at the beginning. I installed weconnect-cli the first time yesterday...

tillsteinbach commented 3 years ago

You had the latest version at that time. I fixed it after your report and released the bugfix version late in the evening. So you did nothing wrong :)