segalion / raspipool

Swimming Pool Automation Systen with Raspberry Pi + Home Assistant
MIT License
393 stars 73 forks source link

'AtlasSensor' object has no attribute 'ser' #2

Closed sunflowerABB closed 3 years ago

sunflowerABB commented 4 years ago

Installed on a fresh hass.io image on Raspi3:

core-ssh:~# hassio ha logs

Exception ignored in: <function AtlasSensor.del at 0x71ae9d20> Traceback (most recent call last): File "/config/custom_components/atlas_scientific/sensor.py", line 118, in del self.ser.close() AttributeError: 'AtlasSensor' object has no attribute 'ser'`

EDIT: works after manually restarting hass.io via the command line. Not sure why it doesn’t after normal booting.

segalion commented 4 years ago

Thanks @sunflowerABB I think your report is about the first time you install the custom component. I think its a general problem with all components that needs libraries not installed (in this case the "requirements": ["pyserial"] in manifest). Home Assistant install proper needed libraries (with pip on same enviroment where it is running), but the first time it starts the component before the lib is sucessfully installed. Thats the reason why when you restart second time it works fine.

About your report mistake, you are right. I am pending to review some of this pictures and all the code (for bugs)...

I will try to update this picture today...

Thanks again.