Update to __init__.py?
Posted: Mon Mar 01, 2021 1:55 pm
Hello,
I have been running simulations through NEURON implemented in python for a while with no issues. However, my computer (Windows) just ran a helpful update, and now NEURON no longer works in the python environment. It calls an error to the __init__.py file, which has multiple instances of print functions being called without parentheses. These seemed easy enough to fix, so I went in and added the parentheses, but there is another error in referencing a logging variable in the hoc_execute function (code copied below):
Were there perhaps recent updates to the python NEURON files? If so, can you provide an update to remedy this problem, or provide me with an alternate solution?
Thanks,
Chris
PS I have tried importing neuron alone and h from neuron, both replicate the problem.
I have been running simulations through NEURON implemented in python for a while with no issues. However, my computer (Windows) just ran a helpful update, and now NEURON no longer works in the python environment. It calls an error to the __init__.py file, which has multiple instances of print functions being called without parentheses. These seemed easy enough to fix, so I went in and added the parentheses, but there is another error in referencing a logging variable in the hoc_execute function (code copied below):
Code: Select all
def hoc_execute(hoc_commands, comment=None):
assert isinstance(hoc_commands,list)
if comment:
logging.debug(comment)
for cmd in hoc_commands:
logging.debug(cmd)
success = hoc.execute(cmd)
if not success:
raise HocError('Error produced by hoc command "%s"' % cmd)
def hoc_comment(comment):
logging.debug(comment)
Thanks,
Chris
PS I have tried importing neuron alone and h from neuron, both replicate the problem.