It "looks" like it's working for me, but doesn't. I get this message:
"No results returned from Weather Underground (perhaps a bad station
name??).
Publishing anyway."
It then proceeds to upload all my 5 minute obs. Only thing is, they never
show up on wunderground.
On Sunday, February 9, 2020 at 4:02:21 PM UTC-5, Richard G wrote:
>
>
> Worked for me thanks.
>
> Richard
> On Sunday, 9 February 2020 18:19:00 UTC, Leon Shaner wrote:
>>
>> Richard,
>> It was a long thread. Here is my workaround for the 204 response when
>> the request is valid, but there are no records to return:
>>
>> $ diff wunderfixer wunderfixer_tk
>> 407,409c407
>> < # Valid response, it's just that WU has no records for
>> the requested date
>> < # Return an empty list of TimeStamps (as in WU has no
>> records)
>> < return {}
>> ---
>> > raise IOError("Probably a bad station ID or invalid
>> date")
>>
>> Or if the line numbers don't match yours, it looks like this in context:
>>
>> if hasattr(response, 'code') and response.code != 200:
>> if response.code == 204:
>> # Valid response, it's just that WU has no records for
>> the requested date
>> # Return an empty list of TimeStamps (as in WU has no
>> records)
>> return {}
>> else:
>> raise IOError("Bad response code returned: %d" %
>> response.code)
>>
>> Regards,
>> \Leon
>> --
>> Leon Shaner :: Dearborn, Michigan (iPhone)
>>
>> On Feb 9, 2020, at 12:40 PM, Richard G <[email protected]> wrote:
>>
>>
>> I had an outage of a week where no data was uploaded to wunderground. I
>> discovered all the posts about the change of API etc. so pulled down the
>> development branch. This version with the api_key allowed me to fix data on
>> partial days i.e. when there was some data but on days where there is no
>> data at all then it fails
>>
>> Using database binding 'wx_binding', which is bound to database
>> 'archive_sqlite'
>>
>> Weather Underground Station: INORFOLK**
>>
>> Date to check: 2020-02-07
>>
>> Number of archive records: 288
>>
>> Could not get Weather Underground data.
>>
>> Reason: Probably a bad station ID or invalid date
>>
>> Exiting.
>>
>> The message "could not get Weather Underground data" is correct as there
>> isn't any for that day, but it then needs to upload so there is. Looks like
>> a bug but I thought I would check before reporting.
>>
>> Thanks
>>
>>
>> Richard
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/04c6f04e-502a-40a2-ad9d-62a4fad5a8b5%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/weewx-user/04c6f04e-502a-40a2-ad9d-62a4fad5a8b5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/30ac8208-34d8-4b47-a8ac-636151c794c2%40googlegroups.com.