That was the issue - running 3.6:

[weewx@rocky1 ~]$ python --version
Python 3.6.8

[weewx@rocky1 ~]$ weectl debug --output=/tmp/debug.txt
Using configuration file /etc/weewx/weewx.conf

Thank you for the solution,
 - chris

On Saturday, April 6, 2024 at 3:38:33 PM UTC-5 Tom Keffer wrote:

> What version of Python are you using? The nullcontext requires v3.7 or 
> greater (which breaks our supposed claim of supporting v3.6 or later).
>
> If you are using v3.6, you can specify an explicit path and get the 
> results you need:
>
> *weectl debug --output=/tmp/debug.txt*
>
>
>
>
>
> On Sat, Apr 6, 2024 at 1:14 PM Chris Eidem <[email protected]> wrote:
>
>> I'm trying to find out why rsync isn't sending to my web server and while 
>> attempting to debug that, i tried running 'weewxctl debug' and got the 
>> following output:
>>
>> [weewx@rocky1 ~]$ weectl debug
>> Using configuration file /etc/weewx/weewx.conf
>> Traceback (most recent call last):
>>   File "/usr/share/weewx/weectl.py", line 74, in <module>
>>     main()
>>   File "/usr/share/weewx/weectl.py", line 66, in main
>>     namespace.func(namespace)
>>   File "/usr/share/weewx/weectllib/__init__.py", line 121, in dispatch
>>     namespace.action_func(config_dict, namespace)
>>   File "/usr/share/weewx/weectllib/debug_cmd.py", line 54, in debug
>>     weectllib.debug_actions.debug(config_dict, output=namespace.output)
>>   File "/usr/share/weewx/weectllib/debug_actions.py", line 52, in debug
>>     sink = contextlib.nullcontext(sys.stdout)
>> AttributeError: module 'contextlib' has no attribute 'nullcontext'
>> [weewx@rocky1 ~]$ 
>>
>> The /var/log/messages that showed up at the time:
>>
>> Apr  6 15:08:38 rocky1 weectl[17297]: INFO weectllib: Initializing weectl 
>> version 5.0.2
>> Apr  6 15:08:38 rocky1 weectl[17297]: INFO weectllib: Command line: 
>> /usr/share/weewx/weectl.py debug
>>
>> I have no clue why it's failing. This is from an upgraded weewx on a 
>> Rocky Linux server.
>>
>> -- 
>> 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/235d7bad-0802-4ccf-be89-d3029b8f4308n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/235d7bad-0802-4ccf-be89-d3029b8f4308n%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/ba219438-c96a-457d-a58f-391396aad233n%40googlegroups.com.

Reply via email to