Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

Legacy Cumulus 1 release 1.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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

System.InvalidOperationException in build 3036

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
rpedroletti
Posts: 7
Joined: Wed 30 Dec 2009 7:32 am
Weather Station: WMR928NX
Operating System: Windows XP

System.InvalidOperationException in build 3036

Post by rpedroletti »

Hello,

I'm testing cumulus MX, and I met this exception :

Code: Select all

2016-02-12 19:40:38.732 System.InvalidOperationException: La séquence ne contient aucun élément.
   à System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   à (DateTime) dans C:\Users\steve\Documents\Visual Studio 2015\Projects\CumulusMX\CumulusMX\WeatherStation.cs:ligne 5476
   à (Object , RunWorkerCompletedEventArgs ) dans C:\Users\steve\Documents\Visual Studio 2015\Projects\CumulusMX\CumulusMX\DavisStation.cs:ligne 419
   à System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   à System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
   à System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   à System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   à System.Threading.ThreadPoolWorkQueue.Dispatch()
   à System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
I'm attaching the full MXDiags in which you'll also find a couple of I/O errors due to windows 10 firewall I finally managed to setup in the right way.
Thank you.
Richard.
You do not have the required permissions to view the files attached to this post.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: System.InvalidOperationException in build 3036

Post by steve »

That's interesting - I actually spotted what is technically a bug in the code only yesterday and corrected it. But I thought it was only a theoretical problem and that its shouldn't normally occur. It happens when it tries to calculate the 3-hour temperature trend but there is no data to do it.

I think that you are hitting the problem because of problems in your data logs:

2016-02-12 19:39:13.555 Error on line 1 of data\févr.16log.txt: Le format de la chaîne d'entrée est incorrect.

2016-02-12 19:39:13.602 GetRainfallTotals: Error on line 1214 of dayfile.txt: Le format de la chaîne d'entrée est incorrect.

2016-02-12 19:39:20.977 Loading last N hour data from data logs: 12/02/2016 19:30:00
2016-02-12 19:39:20.977 Loaded 3 entries to last hour data list
2016-02-12 19:39:20.993 Error at line 484 of data\févr.16log.txt : Le format de la chaîne d'entrée est incorrect.
2016-02-12 19:39:20.993 Please edit the file to correct the error
2016-02-12 19:39:20.993 Loaded 0 entries to last 3 hour data list
2016-02-12 19:39:20.993 Error at line 468 of data\févr.16log.txt : Le format de la chaîne d'entrée est incorrect.
2016-02-12 19:39:20.993 Please edit the file to correct the error
2016-02-12 19:39:20.993 Loaded 0 entries to graph data list
2016-02-12 19:39:21.009 Error at line 192 of data\févr.16log.txt : Le format de la chaîne d'entrée est incorrect.
2016-02-12 19:39:21.009 Please edit the file to correct the error
2016-02-12 19:39:21.009 Loaded 0 entries to recent data list
2016-02-12 19:39:21.024 Error at line 1225 of data\dayfile.txt : Le format de la chaîne d'entrée est incorrect.
2016-02-12 19:39:21.024 Please edit the file to correct the error

You will need to correct those problems.
Steve
rpedroletti
Posts: 7
Joined: Wed 30 Dec 2009 7:32 am
Weather Station: WMR928NX
Operating System: Windows XP

Re: System.InvalidOperationException in build 3036

Post by rpedroletti »

Hello Steve,

Well it's weird : I had a look at the couple of lines mentionned as containing incorrect data : I can't find anyhting with a problem.
I decided then to relaunch cumulus MX, and the problem seems to have disappeared.
I don't know what happened, but anyway, as you said, the theorical bug is now fixed.

I'm about to install cumulus MX on a raspberry I don't use. Do you think a raspberry model B is enough or a raspberry 2 is mandatory. As it is .Net code, I guess a model 2 is required, doesn't it ?

Thank you.
Richard
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: System.InvalidOperationException in build 3036

Post by mcrossley »

MX runs fine on a model B, my old B runs MX, and another web site using NginX and PHP.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: System.InvalidOperationException in build 3036

Post by steve »

I suspect that the reason you didn't hit the problem this time is that there was logger data to download, so the 3-hour data list was not empty. If you look in the latest MX diags file, you'll be able to see whether it is still complaining about the log files.

A model B is fine for running MX, I used one to begin with until I got a Pi 2.
Steve
Locked