Page 1 of 1

Field names are restricted to 31 characters

Posted: Sat Mar 24, 2018 1:36 pm
by bremen
Hi.

I restarted working on my net but, after the first simulation, the code crashed during the creation of the Mat file with the following:
"ValueError: Field names are restricted to 31 characters"

I have in fact used more than 31 characters in the "netParams.connParams" connections names.
Can be this the source of the issue?

NetPyNe Version: 0.7.7 and Scipy Version: 1.0.0.

Cheers
Stefano

Re: Field names are restricted to 31 characters

Posted: Sat Mar 24, 2018 8:28 pm
by salvadord
Hi Stefano,

I have never encountered this error but yes, it is related to the scipy savemat function, which has a limit of 31 chars per field: https://docs.scipy.org/doc/scipy/refere ... vemat.html

There seems to be an option to increase it to 64: long_field_names = True

hope this helps
Salva

Re: Field names are restricted to 31 characters

Posted: Sun Mar 25, 2018 6:21 am
by bremen
Hi Salvador.
Yes that was the cause.
I have reduces the length of the names, involved in the connection description, and the mat file was saved without problems.

Cheers
Stefano