pyNN module imcompatible with python 3.10 and 3.11

39 views
Skip to first unread message

jiy...@gmail.com

unread,
Jul 10, 2022, 5:34:41 PM7/10/22
to Neural Ensemble
Hi there,

Was using pyNN 0.9 and python 2.7 for quite some time, recently converted to pyNN 1.0 and python 3.10, an error was spotted.

In ~/.local/lib/python3.10/site-packages/pyNN/parameters.py

299 if issubclass(expected_dtype, ArrayParameter) and isinstance(value, collections.Sized):
303 if isinstance(value[0], collections.Sized):

function collections has been changed to collections.abc by default in python 3.9+, so the correct usage should be

299 if issubclass(expected_dtype, ArrayParameter) and isinstance(value, collections.abc.Sized):
303 if isinstance(value[0], collections.abc.Sized):

The code has to be modifed or attribute error would occur when populations are made.

Regards,
Tiger

Andrew Davison

unread,
Dec 6, 2022, 12:25:37 PM12/6/22
to Neural Ensemble
Hi,

Many thanks for the report. This has now been fixed, the fix was released in PyNN 0.10.1.

Andrew

Reply all
Reply to author
Forward
0 new messages