Can you upload your SMAPI log here:
https://smapi.io/log so we can better see what might be causing the error.
Oh, I can see the problem now. The same line is there like 1000 times. I edited the file (meaning I deleted copies of this same line).
And its working now
Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
at StardewValley.NPC.playSleepingAnimation_PatchedBy<aedenthorn.MultipleSpouses>(NPC this)
at StardewValley.NPC.Halt()
at StardewValley.NPC.resetForNewDay(Int32 dayOfMonth)
at StardewValley.NPC.dayUpdate(Int32 dayOfMonth)
at StardewValley.Game1._newDayAfterFade()+MoveNext()
at StardewValley.Game1.<>c.<newDayAfterFade>b__716_2()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
---------------
at StardewValley.Game1._update(GameTime gameTime) in stardewvalley\Farmer\Farmer\Game1.cs:line 4154
at StardewValley.Game1.Update(GameTime gameTime) in stardewvalley\Farmer\Farmer\Game1.cs:line 3974
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in SMAPI\Framework\SCore.cs:line 1117
[12:27:20 TRACE game] _newDayTask failed with an exception
[12:27:20 ERROR game] FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Number.ParseInt32(ReadOnlySpan`1 value, NumberStyles styles, NumberFormatInfo info)
at StardewValley.NPC.playSleepingAnimation_PatchedBy<aedenthorn.MultipleSpouses>(NPC this)
at StardewValley.NPC.Halt()
at StardewValley.NPC.resetForNewDay(Int32 dayOfMonth)
at StardewValley.NPC.dayUpdate(Int32 dayOfMonth)
at StardewValley.Game1._newDayAfterFade()+MoveNext()
at StardewValley.Game1.<>c.<newDayAfterFade>b__716_2()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)