Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

An issue with Czech locale

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
zavin4c
Posts: 3
Joined: Sun 24 Dec 2017 11:58 pm
Weather Station: WH1080
Operating System: Raspbian on RPi 3

An issue with Czech locale

Post by zavin4c »

Hi, I am currently using CumulusMX with Mono and Raspberry Pi 3. Recently I've found out an update came out which included support for two digit separator locales, so I switched to Czech locale. Everything seemed fine until I noticed the graphs and part of Rainfall section in index.htm are partly broken. The graphs (default trends.htm) were loading data only from the time the station has been started and the Rainfall section was working only for the current day. When I looked in the log, I noticed that there are a few errors with reading dayfile and monthly log files. example errors below

Code: Select all

GetRainfallTotals: Error on line 1 of dayfile.txt: Input string was not in a correct format.

Code: Select all

Error at line 1 of data/dub19log.txt : Input string was not in a correct format.
Please edit the file to correct the error
I looked in the source code and I suppose the causes of these errors are on lines 460, 461 (dayfile) and 5940, 5941, 6017, 6018, 6100, 6101, 6179, 6180, 6236, 6237 (monthly log) in WeatherStation.cs if that helps you. The problem seems to be that Mono takes the Czech locale in "24. 04. 2019" format while Cumulus expects "24.4.2019". When I run Cumulus on Windows, the logs are in the correct "24.04.2019" format.
Is there any chance of this bug getting fixed in the futere?

full error section

Code: Select all

...
2019-04-23 22:00:09.772 Cumulus Starting
2019-04-23 22:00:09.773 Opening station
2019-04-23 22:00:09.845 Last update time from today.ini: 23. 4. 2019 22:00:00
2019-04-23 22:00:09.845 Read today file: Date = 23. 4. 2019, LastUpdateTime = 23. 4. 2019 22:00:00, Month = 4
2019-04-23 22:00:09.851 ReadTodayfile: set notraininit false
2019-04-23 22:00:09.861 /home/pi/Desktop/CumulusMX/data/alltime.ini
2019-04-23 22:00:09.863 Alltime.ini file read
2019-04-23 22:00:09.889 MonthlyAlltime.ini file read
2019-04-23 22:00:09.895 Month.ini file read
2019-04-23 22:00:09.901 Year.ini file read
2019-04-23 22:00:09.904 Finding raintoday from logfile data/dub19log.txt
2019-04-23 22:00:09.904 Expecting listsep=; decimal=,
2019-04-23 22:00:10.681 Midnight rain found in the following entry:
2019-04-23 22:00:10.681 23. 04. 19;00:00;10,4;59;2,7;2,5;12,2;95;0,0;0,0;1015,2;578,1;24,4;39;3,6;10,4;10,4;0,0;0;0,00;0,00;8,4;0;0,0;90;0,0;0,0
2019-04-23 22:00:10.708 Setting raintoday from logfile = 0,6
2019-04-23 22:00:10.708 Calculating rain counter = 578,7
2019-04-23 22:00:10.708 Midnight rain found = 578,1
2019-04-23 22:00:10.711 Getting rain totals, rain season start = 1
2019-04-23 22:00:10.711 Today = 23/04/19
2019-04-23 22:00:10.713 GetRainfallTotals: Error on line 1 of dayfile.txt: Input string was not in a correct format.
2019-04-23 22:00:10.714 Rainthismonth from dayfile.txt: 0
2019-04-23 22:00:10.714 Rainthisyear from dayfile.txt: 0
2019-04-23 22:00:10.718 Looking for Fine Offset station, VendorID=0x1941 ProductID=0x8021
2019-04-23 22:00:10.844 Fine Offset station found
2019-04-23 22:00:11.072 Stream opened
2019-04-23 22:00:11.073 Reading pressure offset
2019-04-23 22:00:11.666 Rel pressure = 1012,3
2019-04-23 22:00:11.666 Abs pressure = 949,3
2019-04-23 22:00:11.666 Offset       = 63
2019-04-23 22:00:11.669 Loading last N hour data from data logs: 23. 4. 2019 22:00:00
2019-04-23 22:00:11.677 Error at line 1 of data/dub19log.txt : Input string was not in a correct format.
2019-04-23 22:00:11.677 Please edit the file to correct the error
2019-04-23 22:00:11.678 Loaded 0 entries to last hour data list
2019-04-23 22:00:11.688 Error at line 1 of data/dub19log.txt : Input string was not in a correct format.
2019-04-23 22:00:11.689 Please edit the file to correct the error
2019-04-23 22:00:11.689 Loaded 0 entries to last 3 hour data list
2019-04-23 22:00:11.698 Error at line 1 of data/dub19log.txt : Input string was not in a correct format.
2019-04-23 22:00:11.699 Please edit the file to correct the error
2019-04-23 22:00:11.699 Loaded 0 entries to graph data list
2019-04-23 22:00:11.708 Error at line 1 of data/dub19log.txt : Input string was not in a correct format.
2019-04-23 22:00:11.708 Please edit the file to correct the error
2019-04-23 22:00:11.708 Loaded 0 entries to recent data list
2019-04-23 22:00:11.714 Error at line 1 of data/dayfile.txt : Input string was not in a correct format.
2019-04-23 22:00:11.714 Please edit the file to correct the error
2019-04-23 22:00:11.715 Loaded 0 entries to daily data list
2019-04-23 22:00:11.736 Current culture: Czech (Czech Republic)
...
User avatar
mcrossley
Posts: 12686
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: An issue with Czech locale

Post by mcrossley »

Can you zip up your diags folder for me, please include the dayfile too.

If I'm reading this correctly your were using a date format "23.04.19", but are now using "23. 04. 19"

If you change the date/time format, then you will have to convert all your existing data files - which is why it is recommended to set your locale at the start and stick with it.
zavin4c
Posts: 3
Joined: Sun 24 Dec 2017 11:58 pm
Weather Station: WH1080
Operating System: Raspbian on RPi 3

Re: An issue with Czech locale

Post by zavin4c »

Sure, here you go.
Yes, I know, that's why I converted those files to the new format before switching to new locale.
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12686
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: An issue with Czech locale

Post by mcrossley »

OK, I agree, MX does not currently handle multi-character date separators. I'll do a test build for you soon...
zavin4c
Posts: 3
Joined: Sun 24 Dec 2017 11:58 pm
Weather Station: WH1080
Operating System: Raspbian on RPi 3

Re: An issue with Czech locale

Post by zavin4c »

Ok, thanks!
Post Reply