danimtb / dasshio

Hass.io add-on to easily use Amazon Dash Buttons with Home Assistant
Apache License 2.0
192 stars 63 forks source link

Datetime not defined #78

Closed herik63 closed 5 years ago

herik63 commented 5 years ago

Hallo, I just upgraded to the latest version and the plugin doesn’t work anymore :(

2019-04-15 11:03:24,078 | ERROR | Caught exception in sniff: name 'datetime' is not defined Traceback (most recent call last): File "/dasshio.py", line 170, in count=0) File "/usr/lib/python3.6/site-packages/scapy/sendrecv.py", line 889, in sniff if stop_filter and stop_filter(p): File "/dasshio.py", line 30, in arp_display current_time = datetime.utcnow() NameError: name 'datetime' is not defined 2019-04-15 11:03:24,093 | INFO | Finishing sniffing 2019-04-15 11:03:24,094 | INFO | Starting sniffing...

Running in docker under Debian box.

danimtb commented 5 years ago

Which version of dasshio are you using?

dustardly commented 5 years ago

Same Thing to me , hassio 0.91.3 and dasshio last version

2019-04-15 15:04:46,923 | ERROR | Caught exception in sniff: module 'datetime' has no attribute 'utcnow' Traceback (most recent call last): File "/dasshio.py", line 172, in count=0) File "/usr/lib/python3.6/site-packages/scapy/sendrecv.py", line 889, in sniff if stop_filter and stop_filter(p): File "/dasshio.py", line 32, in arp_display current_time = datetime.utcnow() AttributeError: module 'datetime' has no attribute 'utcnow' 2019-04-15 15:04:46,936 | INFO | Finishing sniffing 2019-04-15 15:04:46,937 | INFO | Starting sniffing... 2019-04-15 15:04:50,975 | ERROR | Caught exception in sniff: module 'datetime' has no attribute 'utcnow'

herik63 commented 5 years ago

0.3.2, just released, I guess.

danimtb commented 5 years ago

Duplicated in #76, fixed in #77. Will be released in 0.3.3 once the images are uploaded: https://travis-ci.org/danimtb/dasshio/builds/520280729

Thanks for reporting