Ray,
I'm successfully using cwxn, but I had problems earlier this year. (but not 
the problem you're having)  
Here is a thread discussing cwxn.py. Gary, gjr80 modified the file, you can 
find it in the fourth post in the following thread:
https://groups.google.com/g/weewx-user/c/TUn5ibGr9uo
Perhaps his modified fill will help you.


On Friday, November 27, 2020 at 7:14:46 PM UTC-6 Ray Wells wrote:

> My first post here and I'm confused already. Must be something to do with 
> my age! If I'm doing something wrong just dig a hole and bury me.
>
> This is advice on a fix rather than a call for help.
>
> Ok, I'm setting up weewx v4.2 on a RPi4 as a new installation. I had been 
> running v3.8 on the computer but it wasn't live, but worked fine. Weewx 4.2 
> appears to be working fine (with simulator) but my first extension, cwxn 
> 0.4 bombed out with an error ... 
>
> $ sudo tail /var/log/syslog
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****      
> self.loadServices(config_dict)
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****    File 
> "/usr/share/weewx/weewx/engine.py", line 153, in loadServices
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****      obj = 
> weeutil.weeutil.get_object(svc)(self, config_dict)
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****    File 
> "/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****      mod = 
> __import__(module)
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****    File 
> "/usr/share/weewx/user/cwxn.py", line 94
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****      except 
> Exception, e:
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****              
>         ^
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****  
> SyntaxError: invalid syntax
> Nov 28 11:03:09 120wx weewx[2837] CRITICAL __main__:     ****  Exiting.
>
> My online search for "except Exception, e:" revealed a change in syntax 
> for Python v3.x and, after changing line 94 in cwxn.py to read "except 
> Exception *as* e:" the extension now works as intended. 
>
> Thought mwall might like to know.
>
> BTW, cwxn formats humidity to 3 digits whereas the aprs spec calls for 
> just 2. If cwxn is used for aprs the last digit is truncated making 20% 
> (020) humidity appear as 2% (02). For my use I modified cwxn.py - problem 
> solved.
>
> Ray
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f8c4ef62-e84e-4194-b4f0-a9ae5438615fn%40googlegroups.com.

Reply via email to