TypeError following the "Initialising the simulator" step in the documentation
rberg2 opened this issue · comments
Hello,
I am attempting to validate my installation of PyNN and Nest-simulator in a rather large miniconda environment. While running the example code I run into the following error. Do you have any idea whats going wrong?
Python 3.8.10 (default, Jun 4 2021, 15:09:15)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyNN.nest import *
Apr 13 18:05:23 CopyFile [Error]:
Could not open source file.
Error in nest resource file: /BadIO in CopyFile_
-- N E S T --
Copyright (C) 2004 The NEST Initiative
Version: 3.3
Built: Apr 13 2022 17:17:35
This program is provided AS IS and comes with
NO WARRANTY. See the file LICENSE for details.
Problems or suggestions?
Visit https://www.nest-simulator.org
Type 'nest.help()' to find out more about NEST.
>>> setup()
0
>>> setup(timestep=0.1, min_delay=0.1, max_delay=10.0)
0
>>> from pyNN.utility import init_logging
>>> init_logging("logfile", debug=True)
<Logger PyNN (DEBUG)>
>>> p1 = Population(100, IF_curr_alpha, structure=space.Grid2D())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/apps/conda/lib/python3.8/site-packages/pyNN/nest/populations.py", line 141, in __init__
super(Population, self).__init__(size, cellclass,
File "/apps/conda/lib/python3.8/site-packages/pyNN/common/populations.py", line 672, in __init__
self.celltype = cellclass(**cellparams)
TypeError: type object argument after ** must be a mapping, not NoneType
Thanks in advance!
Hi @rberg2,
There's just a small bug in your code, it should be
p1 = Population(100, IF_curr_alpha(), structure=space.Grid2D())
not
p1 = Population(100, IF_curr_alpha, structure=space.Grid2D())
[By the way, I note you're using NEST 3.3, which is not fully compatible with the current release of PyNN (0.10.0) - NEST 3.1 is preferred. PyNN 0.10.1 will be released very soon (this week or next), and will include support for NEST 3.3, so please update your PyNN installation once the new version comes out].
Thanks for the correction! It looks like I was following the instructions for PyNN 0.7.