Closed parallelsys closed 5 years ago
I took this option out: station = 0 The error did not show after that... BUT I cant see if its uploading or not yet...
please try commit f339788
Try this latest commit and I get this error...
Apr 17 14:55:04 monitor weewx[13931]: Traceback (most recent call last): Apr 17 14:55:04 monitor weewx[13931]: File "/usr/share/weewx/weewx/restx.py", line 350, in run_loop Apr 17 14:55:04 monitor weewx[13931]: self.process_record(_record, dbmanager) Apr 17 14:55:04 monitor weewx[13931]: File "/usr/share/weewx/weewx/restx.py", line 401, in process_record Apr 17 14:55:04 monitor weewx[13931]: _payload = self.get_post_body(_full_record) Apr 17 14:55:04 monitor weewx[13931]: File "/usr/share/weewx/user/windy.py", line 126, in get_post_body Apr 17 14:55:04 monitor weewx[13931]: data['dateutc'] = time.strftime("%Y-%m-%d %H:%M:%S", Apr 17 14:55:04 monitor weewx[13931]: NameError: global name 'time' is not defined Apr 17 14:55:04 monitor weewx[13931]: restx: Windy: Thread exiting. Reason: global name 'time' is not defined
Now I get:
Apr 16 23:56:59 weewx weewx[669]: restx: Windy: Unexpected exception of type <type 'exceptions.NameError'> Apr 16 23:56:59 weewx weewx[669]: restx: Windy: Thread exiting. Reason: global name 'time' is not defined
fixed at commit 9a3427d
now this error.. Apr 17 15:01:44 monitor weewx[14011]: restx: Windy: Failed upload attempt 1: HTTP Error 404: Not Found
they changed the url on us just in the past 20 hours!
try commit 8a30e74
still issues...
Apr 17 15:11:02 monitor weewx[14219]: restx: Windy: Failed upload attempt 2: HTTP Error 404: Not Found Apr 17 15:11:08 monitor weewx[14219]: restx: Windy: Failed upload attempt 3: HTTP Error 404: Not Found Apr 17 15:11:13 monitor weewx[14219]: restx: Windy: Failed to publish record 2019-04-17 15:06:02 AEST (1555477562): Failed upload after 3 tries Apr 17 15:11:13 monitor weewx[14219]: restx: Windy: url: https://stations.windy.com/pws/update/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaSI6MTAyMjg0NCwiaWF0IjoxNTU1NDc3Nzg0fQ.GaZk1vhJ0lM7kDIZV9W-an0otxCz Apr 17 15:11:13 monitor weewx[14219]: restx: Windy: Failed upload attempt 1: HTTP Error 404: Not Found Apr 17 15:11:15 monitor weewx[14219]: engine: Starting main packet loop. Apr 17 15:11:19 monitor weewx[14219]: restx: Windy: Failed upload attempt 2: HTTP Error 404: Not Found
this is what we get for trying to do it the 'right' way (using POST)
the easy way is to use GET, but that is not semantically correct
try commit 7159285
Apr 17 00:18:33 weewx weewx[1011]: restx: Windy: Failed to publish record 2019-04-17 00:18:00 CDT (1555478280): Failed upload after 3 tries ^C root@weewx:/opt/weewx-windy# git pull Already up-to-date. root@weewx:/opt/weewx-windy#
and yet... Apr 17 15:22:47 monitor weewx[14337]: restx: Windy: Failed upload attempt 1: HTTP Error 404: Not Found
Apr 17 15:23:03 monitor weewx[14337]: restx: Windy: Failed to publish record 2019-04-17 15:20:02 AEST (1555478402): Failed upload after 3 tries Apr 17 15:23:03 monitor weewx[14337]: restx: Windy: url: https://stations.windy.com/pws/update/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaSI6MTAyMjg0NCwiaWF0IjoxNTU1NDc3Nzg0fQ.GaZk1vhJ0lM7kDIZV9W-an0otxCzEKBFSLcq3K5sY9M Apr 17 15:23:03 monitor weewx[14337]: restx: Windy: Failed upload attempt 1: HTTP Error 404: Not Found Apr 17 15:23:05 monitor weewx[14337]: engine: Starting main packet loop. Apr 17 15:23:09 monitor weewx[14337]: restx: Windy: Failed upload attempt 2: HTTP Error 404: Not Found Apr 17 15:23:14 monitor weewx[14337]: restx: Windy: Failed upload attempt 3: HTTP Error 404: Not Found Apr 17 15:23:19 monitor weewx[14337]: restx: Windy: Failed to publish record 2019-04-17 15:21:02 AEST (1555478462): Failed upload after 3 tries
try it with GET not POST at commit 5eb8c0a
their server responses suck
and commit 71d72da uses correct data in the GET requests
we have a winner! Apr 17 15:47:36 monitor weewx[14546]: restx: Windy: Published record 2019-04-17 15:46:01 AEST (1555479961)
Now to see if expected data shows up on Windy :)
I am getting:
Apr 16 22:48:17 weewx weewx[18403]: restx: Windy: Unexpected exception of type <type 'exceptions.AttributeError'> Apr 16 22:48:17 weewx weewx[18403]: restx: Windy: Thread exiting. Reason: 'NoneType' object has no attribute 'getSql'