Weewx Fails to Upload Data to Wunderground

106 views
Skip to first unread message

Kirk

unread,
Nov 2, 2020, 2:11:51 PM11/2/20
to weewx-user
My set-up does not allow my data to upload to the Weather Underground using weewx.  I had no problem uploading the data using wuhu.  Below are the messages I get about Certificate Error.

What do I need to do to fix this problem?  The wunderground web pages says my system is connected.

Here are my logs:

Nov  1 10:04:45 localhost weewx[2191] INFO weewx.restx: Wunderground: Posting not enabled.
Nov  1 12:03:28 localhost weewx[19483] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  1 12:07:32 localhost weewx[19483] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  1 12:07:32 localhost weewx[19483] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  1 14:14:29 localhost weewx[5403] INFO weewx.restx: Wunderground-PWS: Data for station KOHMENTO21 will be posted
Nov  1 14:15:30 localhost weewx[5403] ERROR weewx.restx: Wunderground-PWS: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  1 14:15:30 localhost weewx[5403] CRITICAL weewx.restx: Wunderground-PWS: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  1 17:14:54 localhost weewx[31561] INFO weewx.restx: Wunderground-PWS: Data for station KOHMENTO21 will be posted
Nov  1 17:24:09 localhost weewx[332] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  1 17:42:14 localhost weewx[3190] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  1 17:58:43 localhost weewx[5611] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  1 18:00:48 localhost weewx[5611] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  1 18:00:48 localhost weewx[5611] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  1 18:38:56 localhost weewx[11313] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  1 18:40:58 localhost weewx[11313] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  1 18:40:58 localhost weewx[11313] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  2 05:28:42 localhost weewx[6039] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  2 05:40:46 localhost weewx[6039] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  2 05:40:46 localhost weewx[6039] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  2 05:56:17 localhost weewx[9951] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  2 05:57:19 localhost weewx[9951] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  2 05:57:19 localhost weewx[9951] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  2 06:24:16 localhost weewx[13780] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO98 will be posted
Nov  2 06:25:17 localhost weewx[13780] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  2 06:25:17 localhost weewx[13780] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  2 06:39:05 localhost weewx[15816] INFO weewx.restx: Wunderground-RF: Data for station KOHMENTO21 will be posted
Nov  2 06:40:07 localhost weewx[15816] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  2 06:40:07 localhost weewx[15816] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'
Nov  2 07:45:52 localhost weewx[25096] INFO weewx.restx: Wunderground-RF: Data for station kohmento21 will be posted
Nov  2 07:46:53 localhost weewx[25096] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  2 07:46:53 localhost weewx[25096] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 'CertificateError'


Here is my config file from weewx.cfg:

    [[Wunderground]]
        # This section is for configuring posts to the Weather Underground.

        # If you wish to do this, set the option 'enable' to true,
        # and specify a station (e.g., 'KORHOODR3') and password.
        # To guard against parsing errors, put the password in quotes.
        enable = true
        station = kohmento21
        password = "WXmen99$"

        log_success = True
        log_failure = True

        # If you plan on using wunderfixer, set the following
        # to your API key:
        api_key = replace_me

        # Set the following to True to have weewx use the WU "Rapidfire"
        # protocol. Not all hardware can support it. See the User's Guide.
        rapidfire = True

##############################################################################

Kirk

Tom Keffer

unread,
Nov 2, 2020, 5:16:34 PM11/2/20
to weewx-user
Two things:

1. You have at least 8 different instances of WeeWX running (that I can count). Kill them all, then start just one instance.

2. While WeeWX does not use ssl.CertificateError, some other library function must be. Early versions of Python 2.7 did not include the class CertificateError. 

Fix problem #1 first. Then, if you still get the CertificateError, either upgrade your copy of Python 2.7, or use Python 3.

-tk

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/64370e78-e957-4a49-bc16-fbe57801ee3bn%40googlegroups.com.

weather992

unread,
Nov 2, 2020, 7:32:13 PM11/2/20
to weewx...@googlegroups.com
I think the 8 instances of the weewx that you say are running are the skins being created.  I only stop one instance of the weewx to make changes to weewx.config file.  No other versions are running.  I check this all the time before editing the configuration file.

I will try updating the python.

Thanks.

Kirk



Sent from my Verizon, Samsung Galaxy smartphone

Kirk Lombardy

unread,
Nov 2, 2020, 7:54:16 PM11/2/20
to weewx...@googlegroups.com
I updated to Python 3 and I still get this error:

Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: Wunderground-RF: Unexpected exception of type <type 'exceptions.AttributeError'>
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: *** Traceback (most recent call last):
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 378, in run_loop
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: ***     self.process_record(_record, dbmanager)
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 442, in process_record
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: ***     self.post_with_retries(_request, data)
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 473, in post_with_retries
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: ***     except ssl.CertificateError as e:
Nov  2 19:46:40 localhost weewx[30248] ERROR weewx.restx: *** AttributeError: 'module' object has no attribute 'CertificateError'
Nov  2 19:46:40 localhost weewx[30248] CRITICAL weewx.restx: Wunderground-RF: Thread terminating. Reason: 'module' object has no attribute 
'CertificateError'

Thank you for your help.

Kirk

Kirk Lombardy

unread,
Nov 2, 2020, 8:31:32 PM11/2/20
to weewx...@googlegroups.com
Oh how embarrassing this is.  I found what my problem was.  I was entering my login password that I use to access my account.  I stumbled upon a webpage that says to enter your key as your password for wunderground and not your access password.  All is working fine now.  

The weewx config file and the instruction manual must state this for future reference to avoid confusion.

Thanks again for your help.

Kirk

On Mon, Nov 2, 2020 at 5:16 PM Tom Keffer <tke...@gmail.com> wrote:

Tom Keffer

unread,
Nov 3, 2020, 7:15:57 AM11/3/20
to weewx-user
It's the Weather Underground that should be embarrassed, not you. They quietly changed their api from requiring a password to requiring the api key, but they did so inconsistently. For example, for my WU station, the api key doesn't work --- I must use the password. Go figure.

But, this is just the reason why your installation no longer raises an exception. It does not explain why ssl.CertificateError does not exist. Can you double check that you are using Python 3? Look at the log. Do not rely on what the shell runs. When WeeWX starts up, you'll see something like:

Nov  3 04:13:29 nuc weewx[141723] INFO __main__: Initializing weewx version 4.2.0
Nov  3 04:13:29 nuc weewx[141723] INFO __main__: Using Python 3.5.9 (default, Sep  7 2020, 07:45:24) #012[GCC 9.3.0]
Nov  3 04:13:29 nuc weewx[141723] INFO __main__: Platform Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
Nov  3 04:13:29 nuc weewx[141723] INFO __main__: Locale is 'en_US.UTF-8'
Nov  3 04:13:29 nuc weewx[141723] INFO __main__: Using configuration file /home/weewx/weewx.conf
Nov  3 04:13:29 nuc weewx[141723] INFO __main__: Debug is 1
Nov  3 04:13:29 nuc weewx[141723] DEBUG __main__: Initializing engine

It's the two highlighted lines that we want.

-tk



d k

unread,
Nov 3, 2020, 2:21:06 PM11/3/20
to weewx-user
Tom,

WU always amazes me... "For example, for my WU station, the api key doesn't work --- I must use the password. Go figure."

I seem to remember using the account password when I started so long ago. Then all of a sudden the WU station was offline with no warning and I had to convert to that station key, not the api key, to make it work again. I'm surprised you are still using your password. Sort of like the no wind if you don't have a direction.


Reply all
Reply to author
Forward
0 new messages