This repository was archived by the owner on May 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 252
This repository was archived by the owner on May 16, 2022. It is now read-only.
Can't reload saved data #132
Copy link
Copy link
Open
Description
with this type:
[<ZeroFormattable>]
type SourceCandle =
{
[<Index(0)>] t: DateTime // time
[<Index(1)>] h: double // high
[<Index(2)>] l: double // low
[<Index(3)>] m: double // midpoint
[<Index(4)>] a: double // average
[<Index(5)>] v: double // volume
[<Index(6)>] d: double // direction
}
and the file attached:
[MKRUSDT.zero.zip](https://github.com/neuecc/ZeroFormatter/files/7735974/MKRUSDT.zero.zip)
you can't deserialize with:
File.ReadAllBytes(filename)
|> ZeroFormatterSerializer.Deserialize<SourceCandle array>
even though ZeroFormatter created the file.
The error is:
System.InvalidOperationException: Timestamp contains invalid values: Seconds=7035036171763712001; Nanos=0
at ZeroFormatter.Internal.BinaryUtil.ReadDateTime(Byte[]& bytes, Int32 offset)
at ZeroFormatter.Formatters.DateTimeFormatter`1.Deserialize(Byte[]& bytes, Int32 offset, DirtyTracker tracker, Int32& byteSize)
at ZeroFormatter.DynamicObjectSegments.ZeroFormatter_Formatters_FSharpResolver`1\[\[ZeroFormatter_Formatters_DefaultResolver\, ZeroFormatter\, Version=1_6_4_0\, Culture=neutral\, PublicKeyToken=null\]\].FSI_0006\.SourceCandle$Formatter.Deserialize(Byte[]& , Int32 , DirtyTracker , Int32& )
at ZeroFormatter.Formatters.ArrayFormatter`2.Deserialize(Byte[]& bytes, Int32 offset, DirtyTracker tracker, Int32& byteSize)
at ZeroFormatter.ZeroFormatterSerializer.CustomSerializer`1.Deserialize[T](Byte[] bytes)
at ZeroFormatter.FSharp.CustomSerializer`1.Deserialize[T](Byte[] bytes)
at ZeroFormatter.FSharp.ZeroFormatterSerializer.Deserialize[T](Byte[] bytes)
Metadata
Metadata
Assignees
Labels
No labels