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

Improve path related errors to help users figure out what is wrong with their paths #98

Open
sanjayankur31 opened this issue May 9, 2023 · 2 comments

Comments

@sanjayankur31
Copy link
Member

At the moment, while trying to get the correct path to record from a synapse, the errors are not very helpful to users. They're of this form:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.lemsml.jlems.core.type.Component.getComponentType()" because "c" is null
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:91)
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:117)
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getDimension(LEMSQuantityPathNeuron.java:151)
        at org.neuroml.export.neuron.NeuronWriter.getMainScript(NeuronWriter.java:1415)
        at org.neuroml.export.neuron.NeuronWriter.generateMainScriptAndMods(NeuronWriter.java:288)
        at org.neuroml.export.neuron.NeuronWriter.generateAndRun(NeuronWriter.java:156)
        at org.neuroml.JNeuroML.main(JNeuroML.java:525)

I wonder if it is possible for us to print some more information, for example---what component was it trying to get the componentType of? That'll help users figure out where the error is in the path.

@borismarin
Copy link
Contributor

@sanjayankur31 could you please provide a test case?

@sanjayankur31
Copy link
Member Author

Sure---I ran into this when trying to record state variables here:

https://github.com/sanjayankur31/Human-L2-3-Cortical-Microcircuit/blob/feat/neuroml/NeuroML2/synapses/testProbAMPANMDA.py#L82

I didn't know that one needed to use the : operator, so I was trying things like this:

TestPop/0/0/synapses/probAMPANMDASyn/0/i_AMPA

I ended up adding a quick check like this to get some more info:

16ab87e


I added info on the : operator to docs now (but worth checking if I've written it all correctly please):

https://docs.neuroml.org/Userdocs/Paths.html

@github-project-automation github-project-automation bot moved this to 🆕 New in NeuroML backlog Oct 2, 2023
@sanjayankur31 sanjayankur31 moved this from 🆕 New to 📋 Backlog in NeuroML backlog Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants