Can I put in a vote for this, too, having been bitten by the same thing on 
a couple of occasions. I know we should all RTFM, and I usually do, but 
altitudes are generally in (plural) feet or meters, and it is a very easy 
slip to make!

On Sunday, March 26, 2023 at 9:14:53 PM UTC-4 Ernest Jillson wrote:

> I decided to give this a whirl on a development pi zero I have. I made a 
> typo in the setup program when selecting my elevation and units. I put 
> "feet" instead of "foot". It didn't end well :).
>  
> It might be worth either allowing foot/feet and/or mooter/meter (ok, I 
> made that up. meter/meters) so dumbos like me can succeed :).
>  
> Would it be possible to check the input and give an error message and a 
> chance to retry instead of just failing? 
>  
> Again, it was my dumbassery that lead to the issue. Just thinking ahead 
> for others that could potentially make the same mistake that I did.  Here 
> is the error message:
>  
> Unpacking python3-weewx (5.0.0a25-1) ...
> Setting up python3-usb (1.0.2-2) ...
> Setting up python3-cheetah (3.2.6-1+b1) ...
> Setting up python3-configobj (5.0.6-4) ...
> Setting up python3-weewx (5.0.0a25-1) ...
> The configuration file /etc/weewx/weewx.conf will be used.
> Processing configuration file /etc/weewx/weewx.conf.
> Traceback (most recent call last):
>   File "/usr/share/weewx/weectl.py", line 53, in <module>
>     main()
>   File "/usr/share/weewx/weectl.py", line 45, in main
>     namespace.func(namespace)
>   File "/usr/share/weewx/weectllib/parse_station.py", line 233, in 
> reconfigure_s                                 tation
>     weecfg.station_config.station_reconfigure(config_path=namespace.config,
>   File "/usr/share/weewx/weecfg/station_config.py", line 102, in 
> station_reconfi                                 gure
>     config_config(config_path, config_dict, dry_run=dry_run, *args, 
> **kwargs)
>   File "/usr/share/weewx/weecfg/station_config.py", line 131, in 
> config_config
>     config_altitude(config_dict, altitude=altitude, no_prompt=no_prompt)
>   File "/usr/share/weewx/weecfg/station_config.py", line 181, in 
> config_altitude
>     raise ValueError(f"Unknown altitude unit {unit}")
> ValueError: Unknown altitude unit feet
> dpkg: error processing package python3-weewx (--configure):
>  installed python3-weewx package post-installation script subprocess 
> returned er                                 ror exit status 1
> Processing triggers for man-db (2.9.4-2) ...
> Errors were encountered while processing:
>  python3-weewx
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" 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-development/91d05658-861c-480e-8546-e72e83fcee19n%40googlegroups.com.

Reply via email to