Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with importing cells #732

Open
salvadord opened this issue Jun 12, 2023 · 6 comments
Open

Problem with importing cells #732

salvadord opened this issue Jun 12, 2023 · 6 comments

Comments

@salvadord
Copy link
Collaborator

https://groups.google.com/g/netpyne-forum/c/RiZu5yuEbpQ/m/NwZS40OqDgAJ?utm_medium=email&utm_source=footer

@vvbragin
Copy link
Contributor

Steps to reproduce:
When GUI loaded from scratch, tap “create new cell type” button (“+”), then “import cell template from file”, and then I picked cell file and mod folder as follows: (tried both 'on' and 'off' for 'compile mod files' checkbox)
image (11)
After doing 'import', pop-up gets dismissed, but nothing more happens (cell model not loaded), and no error message displayed.

But clearly something goes wrong behind the scenes, because if I then click "+" button again, and select this time "Empty cell", I have the following error:
image (12)

@ddelpiano
Copy link
Member

Hi @vvbragin @salvadord , would it be possible to get the hoc (or one of them) that is triggering the error reported? Thx

@vvbragin
Copy link
Contributor

Hi @ddelpiano, I used FSCell.hoc from the path shown on screenshot. I suppose it's taken from here https://github.com/Neurosim-lab/netpyne_workspace/blob/master/cells/FScell.hoc

@vvbragin
Copy link
Contributor

@ddelpiano and also, here's my note I did back when I was looking into this issue, hope it may be helpful:

Also, there is the chance (just my intuition) that the root cause is that "mech already loaded" issue in NEURON, that pops up when mech was already loaded (e.g. during the start-up, among default mechs), and then during importing cell it tries to load it again.
If you'll find out that this is the case - let me know, I think I could help with workaround, as I also struggled a bit with this before:)

@ddelpiano
Copy link
Member

Hi @vvbragin , @SimaoBolota-MetaCell tried to reproduce this problem with the latest OSB (and also without OSB, in our sole netpyne development) but it seems to work properly.
Few questions:

  • when was this noticed?
  • could you retry to reproduce the problem on OSB?
  • was it done on OSB or where you using any other deployment (locally?) ?

Thanks in advance.

@vvbragin
Copy link
Contributor

Hi @ddelpiano , @SimaoBolota-MetaCell, I reproduced it today on https://netpyne.v2.opensourcebrain.org/
The data I entered in "import cell template" window was just the same as on the first screenshot attached above, however I've just noticed that behaviour was slightly different to what I described before. Instead of dismissing the window silently and showing the error when I click "plus" button again (as it was before), it now immediately shows the error, but the different one:


AttributeError Traceback (most recent call last)
~/netpyne/netpyne_ui/netpyne_geppetto.py in importCellTemplate(self=<netpyne_ui.netpyne_geppetto.NetPyNEGeppetto object>, modelParameters={'cellArgs': {}, 'cellName': '', 'fileName': '/home/jovyan/netpyne/workspace/tutorials/cells/FScell.hoc', 'importSynMechs': False, 'label': 'CellType0'})
662 del modelParameters["compileMod"]
663 # import cell template
--> 664 self.netParams.importCellParams(**modelParameters, conds=conds)
self.netParams.importCellParams = <bound method NetParams.importCellParams of <netpyne.specs.netParams.NetParams object at 0x7efdb62082d0>>
modelParameters = {'cellArgs': {}, 'fileName': '/home/jovyan/netpyne/workspace/tutorials/cells/FScell.hoc', 'cellName': '', 'label': 'CellType0', 'importSynMechs': False}
conds = {}
665
666 # convert fron netpyne.specs.dict to dict

/opt/conda/lib/python3.7/site-packages/netpyne/specs/netParams.py in importCellParams(self=<netpyne.specs.netParams.NetParams object>, label='CellType0', fileName='/home/jovyan/netpyne/workspace/tutorials/cells/FScell.hoc', cellName='', conds={}, cellArgs={}, importSynMechs=False, somaAtOrigin=True, cellInstance=False)
647 label = int(self._labelid)
648 self._labelid += 1
--> 649 secs, secLists, synMechs, globs = conversion.importCell(fileName, cellName, cellArgs, cellInstance)
secs = undefined
secLists = undefined
synMechs = undefined
globs = undefined
global conversion.importCell = <function importCell at 0x7efdc9c10b00>
fileName = '/home/jovyan/netpyne/workspace/tutorials/cells/FScell.hoc'
cellName = ''
cellArgs = {}
cellInstance = False
650 cellRule = {'conds': conds, 'secs': secs, 'secLists': secLists, 'globals': globs}
651

/opt/conda/lib/python3.7/site-packages/netpyne/conversion/neuronPyHoc.py in importCell(fileName='/home/jovyan/netpyne/workspace/tutorials/cells/FScell.hoc', cellName='', cellArgs={}, cellInstance=False)
290 if not cellInstance:
291 if isinstance(cellArgs, dict):
--> 292 cell = getattr(h, cellName)(**cellArgs) # create cell using template, passing dict with args
cell = undefined
global getattr = undefined
global h =
cellName = ''
cellArgs = {}
293 else:
294 cell = getattr(h, cellName)(*cellArgs) # create cell using template, passing list with args

AttributeError: 'hoc.HocObject' object has no attribute ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants