pywws-livelog is not working. ¿"self.last_stored_time" type error?

39 views
Skip to first unread message

Hermes Flores

unread,
Apr 1, 2021, 2:19:45 AM4/1/21
to pywws
Hello, sorry for my English. Im usign Ubuntu Server 20 on a Raspberry pi . I have basic knowledge on ubuntu y raspberry.
I am trying to run the livelog but it throws the following error:

Traceback (most recent call last):
  File "/usr/local/bin/pywws-livelog", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/pywws/livelog.py", line 130, in main
    return live_log(args[0])
  File "/usr/local/lib/python3.8/dist-packages/pywws/livelog.py", line 75, in live_log
    datalogger = pywws.logdata.DataLogger(context)
  File "/usr/local/lib/python3.8/dist-packages/pywws/logdata.py", line 102, in __init__
    while saved_date < self.last_stored_time:
TypeError: '<' not supported between instances of 'NoneType' and 'datetime.datetime'

This is my /home/pywws/data/weather.ini:

[paths]
work = /tmp/pywws
datastoretype = filedata
templates = /home/pywws/weather/templates/
graph_templates = /home/pywws/weather/graph_templates/
modules = /home/pywws/weather/modules/

[config]
usb activity margin = 3.0
ws type = 1080
pressure offset = -4.1
logdata sync = 0
frequent writes = True
gnuplot version = 4.2
gnuplot encoding = iso_8859_1
day end hour = 9, False
rain day threshold = 0.2

[live]
services = []
plot = []
text = []

[logged]
services = []
text = []
plot = []                                                                                                                                                                                      
[hourly]
services = []
text = []
plot = []

[12 hourly]
services = []
text = []
plot = []

[daily]
services = []
text = []
plot = []

And this my "/etc/systemd/system/pywws.service":
g
[Unit]
Description=pywws weather station live logging
After=time-sync.target

[Service]
Type=simple
User=pywws
Restart=on-failure
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/log/pywws
ExecStartPre=/bin/chown -R pywws:nogroup /var/log/pywws/
ExecStart=/usr/local/bin/pywws-livelog -v -l /var/log/pywws/pywws.log /home/pywws/data/

Jim Easterbrook

unread,
Apr 1, 2021, 2:25:31 AM4/1/21
to py...@googlegroups.com
On 01/04/2021 01:38, Hermes Flores wrote:
> Hello, sorry for my English. Im usign Ubuntu Server 20 on a Raspberry pi
> . I have basic knowledge on ubuntu y raspberry.
> I am trying to run the livelog but it throws the following error:

> /*  File "/usr/local/lib/python3.8/dist-packages/pywws/logdata.py", line
> 102, in __init__*/
> /*    while saved_date < self.last_stored_time:*/
> */TypeError: '<' not supported between instances of 'NoneType' and
> 'datetime.datetime/'*

The problem is with the [data] section in your status.ini file. Delete
that section and try running pywws again.
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>
Reply all
Reply to author
Forward
0 new messages