How to debug a restx conversation? (weewx-windy getting 400 error)

26 views
Skip to first unread message

MrPete

unread,
Oct 16, 2025, 1:22:29 PM (5 days ago) Oct 16
to weewx-user
(Context: Ubuntu 20.04, now 22.04 but same issue in both. Running in a proxmox VM. Weewx 5.2.0)

My windy plugin is getting continual connection errors (see below). The debug log isn't exactly helpful.

QUESTION: is there a way to enable more detailed debug of the weewx.restx facility? Ideally I would love to see the data sent/received via restx. That would help me understand what might be wrong. This is supposedly a very simple plugin (only parameter is a key, which is correct.)

Log example now:
```
Oct 16 11:15:51 wx-papapete weewxd[5006]: DEBUG weewx.restx: Windy: Failed upload attempt 3: HTTP Error 400: Bad Request
Oct 16 11:15:51 wx-papapete weewxd[5006]: ERROR weewx.restx: Windy: Failed to publish record 2025-10-16 11:15:00 MDT (1760634900): Failed upload after 3 tries
```

Jobu

unread,
Oct 16, 2025, 1:35:13 PM (5 days ago) Oct 16
to weewx-user
Assuming it depends on the python standard library at some level, like pretty much everything does, adding this will be a start.

```
http_client.HTTPConnection.debuglevel = 1
```

Then it depends what higher level packages it uses.  For example with requests which in turn uses urllib3, you can add

```

logging.basicConfig()

logging.getLogger().setLevel(logging.DEBUG)

logging.getLogger("urllib3").setLevel(logging.DEBUG)

```


Reply all
Reply to author
Forward
0 new messages