pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

STON reader problem

DP
David Pennington
Thu, May 27, 2021 5:11 PM

OK, so I have installed Pharo 9.0 with the M1 VM and everything is nice and quick. I am porting my code across and I have a problem that involves STON Reader.

I use this to convert my objects for storage in my text based database. I can’t run my code because STON Reader fails when reading in one of the objects.

The contents are as follows:

"{#entryName:'PAYPAL *COSYFEET',#entryDate:Date['2021-01-25Z'],#transactionID:'202101250001',#entryAmount:-5041216832887849/140737488355328s8,#entryCategory:nil,#entryDescription:'35314369001 GB , 5959 22JAN21',#match:'N’}”

The errors is this:

Character 122 is at the conjunction of the 4 and 9 in the ewntryAmount: 5041216832887849/140737488355328s8,

Any help on this would be great. I have a few thousand entries to fix if there is a problem with the file (although my code works fine with this file under 8.0)

David Pennington

OK, so I have installed Pharo 9.0 with the M1 VM and everything is nice and quick. I am porting my code across and I have a problem that involves STON Reader. I use this to convert my objects for storage in my text based database. I can’t run my code because STON Reader fails when reading in one of the objects. The contents are as follows: "{#entryName:'PAYPAL *COSYFEET',#entryDate:Date['2021-01-25Z'],#transactionID:'202101250001',#entryAmount:-5041216832887849/140737488355328s8,#entryCategory:nil,#entryDescription:'35314369001 GB , 5959 22JAN21',#match:'N’}” The errors is this: Character 122 is at the conjunction of the 4 and 9 in the ewntryAmount: 5041216832887849/140737488355328s8, Any help on this would be great. I have a few thousand entries to fix if there is a problem with the file (although my code works fine with this file under 8.0) David Pennington
SV
Sven Van Caekenberghe
Thu, May 27, 2021 6:11 PM

David,

You have to load a newer version of STON. You are trying to read a ScaledDecimal, support for this was added around Oct 2018.

https://github.com/svenvc/ston/commit/9c83e3cc2f00cab83e57f2e10a139d6ecef3cb30

See https://github.com/svenvc/ston for load/dependency instructions.

Sven

On 27 May 2021, at 19:11, David Pennington david@totallyobjects.com wrote:

OK, so I have installed Pharo 9.0 with the M1 VM and everything is nice and quick. I am porting my code across and I have a problem that involves STON Reader.

I use this to convert my objects for storage in my text based database. I can’t run my code because STON Reader fails when reading in one of the objects.

The contents are as follows:

"{#entryName:'PAYPAL *COSYFEET',#entryDate:Date['2021-01-25Z'],#transactionID:'202101250001',#entryAmount:-5041216832887849/140737488355328s8,#entryCategory:nil,#entryDescription:'35314369001 GB , 5959 22JAN21',#match:'N’}”

The errors is this:

<ston error.png>

Character 122 is at the conjunction of the 4 and 9 in the ewntryAmount: 5041216832887849/140737488355328s8,

Any help on this would be great. I have a few thousand entries to fix if there is a problem with the file (although my code works fine with this file under 8.0)

David Pennington

David, You have to load a newer version of STON. You are trying to read a ScaledDecimal, support for this was added around Oct 2018. https://github.com/svenvc/ston/commit/9c83e3cc2f00cab83e57f2e10a139d6ecef3cb30 See https://github.com/svenvc/ston for load/dependency instructions. Sven > On 27 May 2021, at 19:11, David Pennington <david@totallyobjects.com> wrote: > > OK, so I have installed Pharo 9.0 with the M1 VM and everything is nice and quick. I am porting my code across and I have a problem that involves STON Reader. > > I use this to convert my objects for storage in my text based database. I can’t run my code because STON Reader fails when reading in one of the objects. > > The contents are as follows: > > "{#entryName:'PAYPAL *COSYFEET',#entryDate:Date['2021-01-25Z'],#transactionID:'202101250001',#entryAmount:-5041216832887849/140737488355328s8,#entryCategory:nil,#entryDescription:'35314369001 GB , 5959 22JAN21',#match:'N’}” > > The errors is this: > > <ston error.png> > > Character 122 is at the conjunction of the 4 and 9 in the ewntryAmount: 5041216832887849/140737488355328s8, > > Any help on this would be great. I have a few thousand entries to fix if there is a problem with the file (although my code works fine with this file under 8.0) > > David Pennington