wee_import Weather Underground HTTP Error 401: Unauthorized

116 views
Skip to first unread message

Clint Parrish

unread,
May 1, 2020, 2:47:20 PM5/1/20
to weewx-user
I recently upgraded to weewx 4.0 and started importing data from my Weather Underground database.  I have about 10 years worth of data that I want to import.

Everything was working last night and I started importing data one year at a time.  This morning, I tried wee_import again and I am getting HTTP Error 401: Unauthorized.

I have not made any apparent changes.

Has anyone else tried wee_import after upgrading to 4.0 and gotten similar results?

Thanks,

Clint

gjr80

unread,
May 1, 2020, 4:27:53 PM5/1/20
to weewx-user
Hi,

Can you provide the console output showing the error and/or the log output.

Gary

Clint Parrish

unread,
May 1, 2020, 8:24:03 PM5/1/20
to weewx-user
Here is the log portion for when I ran wee_import last:

May 1 19:18:35 raspberrypi wee_import[14521] INFO __main__: Starting wee_import...
May 1 19:18:35 raspberrypi wee_import[14521] DEBUG weewx.manager: Daily summary version is 2.0
May 1 19:18:35 raspberrypi wee_import[14521] INFO weeimport.wuimport: Observation history for Weather Underground station 'KILSULLI1' wi$
May 1 19:18:35 raspberrypi wee_import[14521] DEBUG weeimport.wuimport: The following options will be used:
May 1 19:18:35 raspberrypi wee_import[14521] DEBUG weeimport.wuimport: config=/etc/weewx/weewx.conf, import-config=/etc/weewx/wu-im$May 1 19:18:35 raspberrypi wee_import[14521] DEBUG weeimport.wuimport: station=KILSULLI1, from=2008-01-01, to=2009-01-01
May 1 19:18:35 raspberrypi wee_import[14521] DEBUG weeimport.wuimport: apiKey=****************************0bdd
May 1 19:18:35 raspberrypi wee_import[14521] DEBUG weeimport.wuimport: dry-run=None, calc_missing=True, ignore_invalid_data=True
May 1 19:18:35 raspberrypi wee_import[14521] DEBUG weeimport.wuimport: tranche=1000, interval=derive, wind_direction=[0.0, 360.0]

gjr80

unread,
May 1, 2020, 8:34:30 PM5/1/20
to weewx-user
Thanks, and you said you had a 401 error? I don't see that in the log, if that appeared on the console could you post the entire session from the console.

Gary

Clint Parrish

unread,
May 1, 2020, 10:06:45 PM5/1/20
to weewx-user
Gary,

Here is the input and output from the console:
—————————————
~ $ wee_import --import-config=/etc/weewx/wu-import.conf --from=2008-01-01 --to=2009-01-01
Using WeeWX configuration file /etc/weewx/weewx.conf
Starting wee_import...
Observation history for Weather Underground station 'KILSULLI1' will be imported.
Using database binding 'wx_binding', which is bound to database 'weewx.sdb'
Destination table 'archive' unit system is '0x01' (US).
Missing derived observations will be calculated.
Observations timestamped after 2008-01-01 00:00:00 CST (1199167200) and up to and
including 2009-01-02 00:00:00 CST (1230876000) will be imported.
Starting import ...
Records covering multiple periods have been identified for import.
Period 1 ...
Unable to open Weather Underground station KILSULLI1 or HTTP Error 401: Unauthorized
**** Unable to load config file.
**** HTTP Error 401: Unauthorized
**** Nothing done, exiting
————————————
Does WU limit API usage for PWS users? Perhaps they have blocked me.

Thanks,

Clint

gjr80

unread,
May 1, 2020, 10:14:58 PM5/1/20
to weewx-user
Thanks Clint,

Bit tied up at present but I will have a look at this later this arvo. I cannot recall what usage limits there are on the new WU API, I did run into limit issues with the old API (but that was always due to some poor programming on my behalf). I would be surprised if that was the issue this time, unless you have something else that is hammering the API. Though these days when it comes to WU I don't rule anything out any more.

Gary

Clint Parrish

unread,
May 2, 2020, 9:42:46 AM5/2/20
to weewx-user
Gary,

I think wee_import is working as it should. I was able to get the records to import successfully this morning. WU must have some kind of daily restriction on API or access to the data somehow. For now I am doing monthly imports as suggested in the guide. I think annual imports are too much and WU ends up cutting me off.

For what it’s worth, wunderfixer acts the same way so this must be a WU problem.

I will investigate further and update.

Thanks,

Clint

gjr80

unread,
May 3, 2020, 4:46:58 AM5/3/20
to weewx-user
Clint,

Good that it is working. I have spent some time today trying to find something on usage limits for the new WU API but without success. The old API was generous enough that I could not see wee_import (by itself) exceeding any limits. I have no idea about the new API, but these days nothing surprises me when it comes to WU. Take it while you can.

Gary

Clint Parrish

unread,
May 5, 2020, 9:10:56 AM5/5/20
to weewx-user
Gary,

I was able to import all of the nearly 10 years worth of records. I did six month intervals at a time with no issue. Something on WU’s end was giving me grief. I consider this matter to be resolved.

Thanks again and thanks to the many people who put months of work into ver 4.

Clint
Reply all
Reply to author
Forward
0 new messages