libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file
---------------------------------------------------------------------------
DistutilsExecError Traceback (most recent call last)
~/Applications/anaconda3/lib/python3.7/distutils/unixccompiler.py in link(self, target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
204
--> 205 self.spawn(linker + ld_args)
206 except DistutilsExecError as msg:
~/Applications/anaconda3/lib/python3.7/distutils/ccompiler.py in spawn(self, cmd)
908 def spawn(self, cmd):
--> 909 spawn(cmd, dry_run=self.dry_run)
910
~/Applications/anaconda3/lib/python3.7/distutils/spawn.py in spawn(cmd, search_path, verbose, dry_run)
---> 36 _spawn_posix(cmd, search_path, dry_run=dry_run)
~/Applications/anaconda3/lib/python3.7/distutils/spawn.py in _spawn_posix(cmd, search_path, verbose, dry_run)
148 "command %r terminated by signal %d"
--> 149 % (cmd, os.WTERMSIG(status)))
150 elif os.WIFEXITED(status):
DistutilsExecError: command 'g++' terminated by signal 6
During handling of the above exception, another exception occurred:
LinkError Traceback (most recent call last)
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/core/network.py in before_run(self, run_namespace)
896 try:
--> 897 obj.before_run(run_namespace)
898 except Exception as ex:
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/input/poissoninput.py in before_run(self, run_namespace)
--> 115 CodeRunner.before_run(self, run_namespace=run_namespace)
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/groups/group.py in before_run(self, run_namespace)
1141 def before_run(self, run_namespace):
-> 1142 self.create_code_objects(run_namespace)
1143 super(CodeRunner, self).before_run(run_namespace)
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/groups/group.py in create_code_objects(self, run_namespace)
1134 # Overwrite this function to use more than one.
-> 1135 code_object = self.create_default_code_object(run_namespace)
1136 if code_object:
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/groups/group.py in create_default_code_object(self, run_namespace)
1127 override_conditional_write=self.override_conditional_write,
-> 1128 codeobj_class=self.codeobj_class
1129 )
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/codegen/codeobject.py in create_runner_codeobj(group, code, template_name, run_namespace, user_code, variable_indices, name, check_units, needed_variables, additional_variables, template_kwds, override_conditional_write, codeobj_class)
449 override_conditional_write=override_conditional_write,
--> 450 compiler_kwds=compiler_kwds
451 )
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/devices/device.py in code_object(self, owner, name, abstract_code, variables, template_name, variable_indices, codeobj_class, template_kwds, override_conditional_write, compiler_kwds)
326 name=name, compiler_kwds=compiler_kwds)
--> 327 codeobj.compile()
328 return codeobj
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/codegen/codeobject.py in compile(self)
100 for block in ['before_run', 'run', 'after_run']:
--> 101 self.compiled_code[block] = self.compile_block(block)
102
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/codegen/runtime/cython_rt/cython_rt.py in compile_block(self, block)
--> 153 sources=self.sources
154 )
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/codegen/runtime/cython_rt/extension_manager.py in create_extension(self, code, force, name, define_macros, include_dirs, library_dirs, runtime_library_dirs, extra_compile_args, extra_link_args, libraries, compiler, sources, owner_name)
125 key=key,
--> 126 sources=sources)
127 return module
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/codegen/runtime/cython_rt/extension_manager.py in _load_module(self, module_path, define_macros, include_dirs, library_dirs, extra_compile_args, extra_link_args, libraries, code, lib_dir, module_name, runtime_library_dirs, compiler, key, sources)
261 build_extension.build_lib = lib_dir
--> 262 build_extension.run()
263 if prefs['codegen.runtime.cython.delete_source_files']:
~/Applications/anaconda3/lib/python3.7/distutils/command/build_ext.py in run(self)
339 # Now actually compile and link everything.
--> 340 self.build_extensions()
341
~/Applications/anaconda3/lib/python3.7/distutils/command/build_ext.py in build_extensions(self)
448 else:
--> 449 self._build_extensions_serial()
450
~/Applications/anaconda3/lib/python3.7/distutils/command/build_ext.py in _build_extensions_serial(self)
473 with self._filter_build_errors(ext):
--> 474 self.build_extension(ext)
475
~/Applications/anaconda3/lib/python3.7/distutils/command/build_ext.py in build_extension(self, ext)
558 build_temp=self.build_temp,
--> 559 target_lang=language)
560
~/Applications/anaconda3/lib/python3.7/distutils/ccompiler.py in link_shared_object(self, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
716 export_symbols, debug,
--> 717 extra_preargs, extra_postargs, build_temp, target_lang)
718
~/Applications/anaconda3/lib/python3.7/distutils/unixccompiler.py in link(self, target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
206 except DistutilsExecError as msg:
--> 207 raise LinkError(msg)
208 else:
LinkError: command 'g++' terminated by signal 6
The above exception was the direct cause of the following exception:
BrianObjectException Traceback (most recent call last)
<ipython-input-10-d4bffc186c09> in <module>
36
37 spike_monitor = b2.SpikeMonitor(network)
---> 38 b2.run(sim_time*
b2.ms)
39
40
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/units/fundamentalunits.py in new_f(*args, **kwds)
2383 get_dimensions(newkeyset[k]))
2384
-> 2385 result = f(*args, **kwds)
2386 if 'result' in au:
2387 if au['result'] == bool:
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/core/magic.py in run(duration, report, report_period, namespace, profile, level)
372 '''
373 return magic_network.run(duration, report=report, report_period=report_period,
--> 374 namespace=namespace, profile=profile, level=2+level)
375 run.__module__ = __name__
376
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/core/magic.py in run(self, duration, report, report_period, namespace, profile, level)
230 self._update_magic_objects(level=level+1)
231 Network.run(self, duration, report=report, report_period=report_period,
--> 232 namespace=namespace, profile=profile, level=level+1)
233
234 def store(self, name='default', filename=None, level=0):
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/core/base.py in device_override_decorated_function(*args, **kwds)
276 return getattr(curdev, name)(*args, **kwds)
277 else:
--> 278 return func(*args, **kwds)
279
280 device_override_decorated_function.__doc__ = func.__doc__
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/units/fundamentalunits.py in new_f(*args, **kwds)
2383 get_dimensions(newkeyset[k]))
2384
-> 2385 result = f(*args, **kwds)
2386 if 'result' in au:
2387 if au['result'] == bool:
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/core/network.py in run(self, duration, report, report_period, namespace, profile, level)
1006 namespace = get_local_namespace(level=level+3)
1007
-> 1008 self.before_run(namespace)
1009
1010 if len(all_objects) == 0:
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/core/base.py in device_override_decorated_function(*args, **kwds)
276 return getattr(curdev, name)(*args, **kwds)
277 else:
--> 278 return func(*args, **kwds)
279
280 device_override_decorated_function.__doc__ = func.__doc__
~/Applications/anaconda3/lib/python3.7/site-packages/brian2/core/network.py in before_run(self, run_namespace)
897 obj.before_run(run_namespace)
898 except Exception as ex:
--> 899 raise BrianObjectException("An error occurred when preparing an object.", obj) from ex
900
901 # Check that no object has been run as part of another network before
BrianObjectException: Error encountered with object named "poissoninput".
Object was created here (most recent call only, full details in debug log):
File "<ipython-input-10-d4bffc186c09>", line 35, in <module>
rate=poisson_input_rate, weight=w_external)
An error occurred when preparing an object. (See above for original error message and traceback.)