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

Stopping a skill errors. #382

Open
LazzaAU opened this issue Feb 11, 2021 · 4 comments
Open

Stopping a skill errors. #382

LazzaAU opened this issue Feb 11, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@LazzaAU
Copy link
Contributor

LazzaAU commented Feb 11, 2021

I have 50 odd devices in Home Assistant. If i "stop" the skill via the skills tab it then produces 1275 lines of code, snippet of the lines as per below you can see it does the initial count 1 - 50, then starts doubling up.

on a second note, should it delete links in this case anyway ? after all it keeps the devices in the database which is good but perhaps links should stay as well for when i re start the skill ? deleting skill would be a different story obviously.

[DeviceManager] Device link id 1 seems deprecated, removing
[DeviceManager] Device link id 2 seems deprecated, removing
[DeviceManager] Device link id 3 seems deprecated, removing
[DeviceManager] Device link id 4 seems deprecated, removing
[DeviceManager] Device link id 5 seems deprecated, removing
[DeviceManager] Device link id 6 seems deprecated, removing
[DeviceManager] Device link id 7 seems deprecated, removing
[DeviceManager] Device link id 8 seems deprecated, removing
[DeviceManager] Device link id 9 seems deprecated, removing
[DeviceManager] Device link id 10 seems deprecated, removing
[DeviceManager] Device link id 11 seems deprecated, removing
[DeviceManager] Device link id 12 seems deprecated, removing
[DeviceManager] Device link id 13 seems deprecated, removing
[DeviceManager] Device link id 14 seems deprecated, removing
[DeviceManager] Device link id 15 seems deprecated, removing
[DeviceManager] Device link id 16 seems deprecated, removing
[DeviceManager] Device link id 17 seems deprecated, removing
[DeviceManager] Device link id 18 seems deprecated, removing
[DeviceManager] Device link id 19 seems deprecated, removing
[DeviceManager] Device link id 20 seems deprecated, removing
[DeviceManager] Device link id 21 seems deprecated, removing
[DeviceManager] Device link id 22 seems deprecated, removing
[DeviceManager] Device link id 23 seems deprecated, removing
[DeviceManager] Device link id 24 seems deprecated, removing
[DeviceManager] Device link id 25 seems deprecated, removing
[DeviceManager] Device link id 26 seems deprecated, removing
[DeviceManager] Device link id 27 seems deprecated, removing
[DeviceManager] Device link id 28 seems deprecated, removing
[DeviceManager] Device link id 29 seems deprecated, removing
[DeviceManager] Device link id 30 seems deprecated, removing
[DeviceManager] Device link id 31 seems deprecated, removing
[DeviceManager] Device link id 32 seems deprecated, removing
[DeviceManager] Device link id 33 seems deprecated, removing
[DeviceManager] Device link id 34 seems deprecated, removing
[DeviceManager] Device link id 35 seems deprecated, removing
[DeviceManager] Device link id 36 seems deprecated, removing
[DeviceManager] Device link id 37 seems deprecated, removing
[DeviceManager] Device link id 38 seems deprecated, removing
[DeviceManager] Device link id 39 seems deprecated, removing
[DeviceManager] Device link id 40 seems deprecated, removing
[DeviceManager] Device link id 41 seems deprecated, removing
[DeviceManager] Device link id 42 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing

from here on starts doubling up

[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 42 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 41 seems deprecated, removing
[DeviceManager] Device link id 42 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 40 seems deprecated, removing
[DeviceManager] Device link id 41 seems deprecated, removing
[DeviceManager] Device link id 42 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 39 seems deprecated, removing
[DeviceManager] Device link id 40 seems deprecated, removing
[DeviceManager] Device link id 41 seems deprecated, removing
[DeviceManager] Device link id 42 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 38 seems deprecated, removing
[DeviceManager] Device link id 39 seems deprecated, removing
[DeviceManager] Device link id 40 seems deprecated, removing
[DeviceManager] Device link id 41 seems deprecated, removing
[DeviceManager] Device link id 42 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 37 seems deprecated, removing
[DeviceManager] Device link id 38 seems deprecated, removing
[DeviceManager] Device link id 39 seems deprecated, removing
[DeviceManager] Device link id 40 seems deprecated, removing
[DeviceManager] Device link id 41 seems deprecated, removing
[DeviceManager] Device link id 42 seems deprecated, removing
[DeviceManager] Device link id 43 seems deprecated, removing
[DeviceManager] Device link id 44 seems deprecated, removing
[DeviceManager] Device link id 45 seems deprecated, removing
[DeviceManager] Device link id 46 seems deprecated, removing
[DeviceManager] Device link id 47 seems deprecated, removing
[DeviceManager] Device link id 48 seems deprecated, removing
[DeviceManager] Device link id 49 seems deprecated, removing
[DeviceManager] Device link id 50 seems deprecated, removing
[DeviceManager] Device link id 36 seems deprecated, removing

..............

  • 1000 more lines :)
@LazzaAU LazzaAU added the bug Something isn't working label Feb 11, 2021
@LazzaAU
Copy link
Contributor Author

LazzaAU commented Feb 11, 2021

on a third note :

device.py line 40-ish

if not self._deviceType:
	self.logError(f'Failed retrieving device type for device {self._typeName}')
	raise DeviceTypeUndefined(self._typeName)

Needs to also include ... if not self._deviceType and "skill is active":

or else you get multiple versions of this on startup

 [DeviceManager]           Couldn't create device instance: The device HAswitch has no defined type
Traceback (most recent call last):
  File "/home/pi/ProjectAlice/core/device/DeviceManager.py", line 141, in loadDevices
    device = klass(data)
  File "/home/pi/ProjectAlice/skills/HomeAssistant/devices/HAswitch.py", line 26, in __init__
    super().__init__(data)
  File "/home/pi/ProjectAlice/core/device/model/Device.py", line 42, in __init__
    raise DeviceTypeUndefined(self._typeName)
core.device.model.DeviceException.DeviceTypeUndefined: The device HAswitch has no defined type
[HAswitch]                Failed retrieving device type for device HAswitch
NoneType: None

@LazzaAU
Copy link
Contributor Author

LazzaAU commented Feb 11, 2021

and..... :)

"stop" the skill in skills tab of ui and then shutdown results in ..

[SkillManager]            Skill "HomeAssistant" is disabled, failed or does not exist in skills manager
Error while shutting down manager DeviceManager: 'NoneType' object has no attribute 'unregisterDeviceInstance'
Traceback (most recent call last):
  File "/home/pi/ProjectAlice/core/base/SuperManager.py", line 233, in onStop
    manager.onStop()
  File "/home/pi/ProjectAlice/core/device/DeviceManager.py", line 124, in onStop
    device.onStop()
  File "/home/pi/ProjectAlice/core/device/model/Device.py", line 94, in onStop
    self.skillInstance.unregisterDeviceInstance(self)
AttributeError: 'NoneType' object has no attribute 'unregisterDeviceInstance'
Traceback (most recent call last):
  File "/home/pi/ProjectAlice/core/base/SuperManager.py", line 233, in onStop
    manager.onStop()
  File "/home/pi/ProjectAlice/core/device/DeviceManager.py", line 124, in onStop
    device.onStop()
  File "/home/pi/ProjectAlice/core/device/model/Device.py", line 94, in onStop
    self.skillInstance.unregisterDeviceInstance(self)
AttributeError: 'NoneType' object has no attribute 'unregisterDeviceInstance'
[Project Alice]           Shutdown completed, see you soon!

@LazzaAU
Copy link
Contributor Author

LazzaAU commented Feb 11, 2021

and ....

clicking "start" in the skills tab to restart the skill results in this... just not sure why ? cause self.config isn't available ??? shrug

[HomeAssistant]           Starting
[HomeAssistant]           Found 6 device type
[HomeAssistant]           Started!
[SkillManager]            - Couldn't start skill "HomeAssistant". Error: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/home/pi/ProjectAlice/core/base/SkillManager.py", line 394, in _startSkill
    skillInstance.onBooted()
  File "/home/pi/ProjectAlice/skills/HomeAssistant/HomeAssistant.py", line 1049, in onBooted
    if 'http://localhost:8123/api/' in self.getConfig("haIpAddress"):
TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/home/pi/ProjectAlice/core/base/SkillManager.py", line 394, in _startSkill
    skillInstance.onBooted()
  File "/home/pi/ProjectAlice/skills/HomeAssistant/HomeAssistant.py", line 1049, in onBooted
    if 'http://localhost:8123/api/' in self.getConfig("haIpAddress"):
TypeError: argument of type 'NoneType' is not iterable
[HomeAssistant]           Stopped
[SkillManager]            Deactivated skill "HomeAssistant" without persistence
[SkillManager]            Activated skill "HomeAssistant" with persistence

A restart fixes this no problem but not sure what i need to do to fix that one yet.

@LazzaAU LazzaAU changed the title device link removal bug ? Stopping a skill errors. Feb 11, 2021
@Psychokiller1888
Copy link
Member

Yeah, nothing should be deleted as long as the skill isn't uninstalled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants