-
Notifications
You must be signed in to change notification settings - Fork 99
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
'hoc.HocObject' object has no attribute 'instatiate' #289
Comments
Mmm, if icell really points to your cell template I don't really see what can be wrong. |
thanks Werner
yes the line you pointed to is still present in my version of the code.
I know that my icell =my_cell[0] because I added a line "print self.icell" in models.py to see what my icell reflects.
I'll try to resolve the problem thanks for all help.
Alexandra
…________________________________________
From: Werner Van Geit <[email protected]>
Sent: Wednesday, September 11, 2019 9:34 AM
To: BlueBrain/BluePyOpt
Cc: alexandrapierri; Author
Subject: Re: [BlueBrain/BluePyOpt] 'hoc.HocObject' object has no attribute 'instatiate' (#289)
Mmm, if icell really points to your cell template I don't really see what can be wrong.
But are you really sure about ?
"'hoc.HocObject namely 'icell' reflects 'my_cell[0]'" ?
I'm not completely sure about the exact code you use to create the morphology, but could it be that there is maybe some other template involved, that e.g. wraps your template.
I wonder if this
https://github.com/BlueBrain/BluePyOpt/blob/master/bluepyopt/ephys/models.py#L142
is still executed in your case.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#289?email_source=notifications&email_token=ACUVHBBTNJJ5A2MKBWY5643QJDXXRA5CNFSM4IUEEBYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OQAFA#issuecomment-530382868>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACUVHBFCVOA72EKPMXDRKUDQJDXXRANCNFSM4IUEEBYA>.
|
ok, and if you add print(self.icell.soma_list) it crashes ? |
that's correct.
" print self.icell.soma_list
AttributeError: 'hoc.HocObject' object has no attribute 'soma_list'"
I am using your initial version of the code actually.
The only changes I have implemented are on the morphology.py such that it can accept "hoc" morphologies.
Alexandra
…________________________________________
From: Werner Van Geit <[email protected]>
Sent: Thursday, September 12, 2019 3:47 AM
To: BlueBrain/BluePyOpt
Cc: alexandrapierri; Author
Subject: Re: [BlueBrain/BluePyOpt] 'hoc.HocObject' object has no attribute 'instatiate' (#289)
ok, and if you add print(self.icell.soma_list) it crashes ?
and, print(getattr(self.icell, 'soma_list') ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#289?email_source=notifications&email_token=ACUVHBGUYIID3OG24YJOHMTQJHX2LA5CNFSM4IUEEBYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6Q7QRY#issuecomment-530708551>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACUVHBEP64SPFW75BE7ALYLQJHX2LANCNFSM4IUEEBYA>.
that's
|
.... and it is really interesting because the following script (in which I bypass the bluepyopt definitions) works jut fine.
I would like to define my hoc object using the bluepyopt classes workflow though for consistency.
"
from neuron import h, gui
h.load_file('example.hoc')
cell=h.example()#create an instance of this class
soma_py=cell.soma[0]
soma_list_py=cell.soma_list
print cell
print soma_py
print soma_list_py
stim = h.IClamp(0.5, sec=soma_py)
"
Alexandra
…________________________________________
From: Werner Van Geit <[email protected]>
Sent: Thursday, September 12, 2019 3:47 AM
To: BlueBrain/BluePyOpt
Cc: alexandrapierri; Author
Subject: Re: [BlueBrain/BluePyOpt] 'hoc.HocObject' object has no attribute 'instatiate' (#289)
ok, and if you add print(self.icell.soma_list) it crashes ?
and, print(getattr(self.icell, 'soma_list') ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#289?email_source=notifications&email_token=ACUVHBGUYIID3OG24YJOHMTQJHX2LA5CNFSM4IUEEBYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6Q7QRY#issuecomment-530708551>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACUVHBEP64SPFW75BE7ALYLQJHX2LANCNFSM4IUEEBYA>.
|
Hi again Werner
I think the problem is that the code creates an empty cell named: my_cell[0] , which is a new empty object that doesn't carry the sections of my initial "my_cell[0]" template.
Still investigating but I think I am on a track now.
thanks,
Alexandra
…________________________________________
From: Werner Van Geit <[email protected]>
Sent: Thursday, September 12, 2019 3:47 AM
To: BlueBrain/BluePyOpt
Cc: alexandrapierri; Author
Subject: Re: [BlueBrain/BluePyOpt] 'hoc.HocObject' object has no attribute 'instatiate' (#289)
ok, and if you add print(self.icell.soma_list) it crashes ?
and, print(getattr(self.icell, 'soma_list') ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#289?email_source=notifications&email_token=ACUVHBGUYIID3OG24YJOHMTQJHX2LA5CNFSM4IUEEBYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6Q7QRY#issuecomment-530708551>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACUVHBEP64SPFW75BE7ALYLQJHX2LANCNFSM4IUEEB
|
do you think that "def create_empty_cell" creates an empty object that has the name "my_cell" but doesn't actually point to my "my_cell" template?
If so any ideas on how I can make it point to it?
thanks a lot,
Alexandra
…________________________________________
From: Werner Van Geit <[email protected]>
Sent: Thursday, September 12, 2019 3:47 AM
To: BlueBrain/BluePyOpt
Cc: alexandrapierri; Author
Subject: Re: [BlueBrain/BluePyOpt] 'hoc.HocObject' object has no attribute 'instatiate' (#289)
ok, and if you add print(self.icell.soma_list) it crashes ?
and, print(getattr(self.icell, 'soma_list') ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#289?email_source=notifications&email_token=ACUVHBGUYIID3OG24YJOHMTQJHX2LA5CNFSM4IUEEBYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6Q7QRY#issuecomment-530708551>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACUVHBEP64SPFW75BE7ALYLQJHX2LANCNFSM4IUEEBYA>
|
At least it's used to create the 'icell', as in: Maybe you need to overwrite the create_empty_cell method to make sure it loads your hoc file ? |
Is there a chance you can send me the code that causes the problem by email ? Then I could see if I can find a solution. |
Is this still an issue? |
Hello
I use a hoc cell template with Bluepyopt, called 'class_axoaxoniccell_temp.hoc' attached below, and I run into the following issue when I run my bluepyopt script 'test.py' using my hoc cell template.
error:
According to locations.py in ephys, 'hoc.HocObject namely 'icell' reflects 'my_cell[0]' in my case. 'my_cell[0]' does have a soma_list attribute which can be found in the hoc code. If for example I explicitly define "somatic_loc=my_cell.soma_list" in the python script, then the code runs just fine, it is when I define somatic_loc using the "class NrnSeclistLocation" as shown in the python script below, that I get the error mentioned above. To me both methods should ultimately call the same object: "my_cell.soma_list" but they don't. Any help with this would be much appreciated.
thank you,
Alexandra
test.py:
class_axoaxonicell_temp.hoc
The text was updated successfully, but these errors were encountered: