Field names are restricted to 31 characters

A Python package that facilitates development and use of models of biological neural networks

Moderator: tom_morse

Post Reply
bremen
Posts: 45
Joined: Mon Apr 24, 2017 8:15 am
Location: Italy

Field names are restricted to 31 characters

Post 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
salvadord
Posts: 86
Joined: Tue Aug 18, 2015 3:49 pm

Re: Field names are restricted to 31 characters

Post 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
bremen
Posts: 45
Joined: Mon Apr 24, 2017 8:15 am
Location: Italy

Re: Field names are restricted to 31 characters

Post 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
Post Reply