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

Behavior crashed for unknown reason (during polling?) #113

Open
timsainb opened this issue Jun 19, 2016 · 3 comments
Open

Behavior crashed for unknown reason (during polling?) #113

timsainb opened this issue Jun 19, 2016 · 3 comments

Comments

@timsainb
Copy link
Member

Everything was running smoothly for several weeks until this:

"2016-06-18 12:31:03,255","INFO","response: R"                                                              
"2016-06-18 12:31:05,637","ERROR","Unhandled exception: Traceback (most recent call last):                  
  File "/usr/local/anaconda/bin/behave", line 10, in <module>                                               
    execfile(__file__)                                                                                      
  File "/local/home/bird/Code/pyoperant/scripts/behave", line 135, in <module>                              
    main()                                                                                                  
  File "/local/home/bird/Code/pyoperant/scripts/behave", line 131, in main                                  
    behavior.run()                                                                                          
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/base.py", line 153, in run                       
    session=self._run_session)                                                                              
  File "/local/home/bird/Code/pyoperant/pyoperant/utils.py", line 103, in run_state_machine                 
    state = state_functions[state]()                                                                        
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/base.py", line 215, in _run_session              
    post=self.session_post)                                                                                 
  File "/local/home/bird/Code/pyoperant/pyoperant/utils.py", line 103, in run_state_machine                 
    state = state_functions[state]()                                                                        
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 198, in session_main    
    run_trial_queue()                                                                                       
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 164, in run_trial_queue 
    self.run_trial()                                                                                        
  File "/local/home/bird/Code/py-behaviors/glab_behaviors/SameDifProbs2.py", line 265, in run_trial         
    self.consequence_main()                                                                                 
  File "/local/home/bird/Code/py-behaviors/glab_behaviors/SameDifProbs2.py", line 391, in consequence_main  
    self.reward_main() # provide a reward                                                                   
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 520, in reward_main     
    reward_event = self.panel.reward(value=value)                                                           
  File "/local/home/bird/Code/pyoperant/pyoperant/components.py", line 178, in reward                       
    return self.feed(dur=value)                                                                             
  File "/local/home/bird/Code/pyoperant/pyoperant/components.py", line 170, in feed                         
    feed_time = self.up()                                                                                   
  File "/local/home/bird/Code/pyoperant/pyoperant/components.py", line 110, in up                           
    time_up = self.IR.poll(timeout=self.max_lag)                                                            
  File "/local/home/bird/Code/pyoperant/pyoperant/hwio.py", line 39, in poll                                
    return self.interface._poll(timeout=timeout,**self.params)                                              
  File "/local/home/bird/Code/pyoperant/pyoperant/interfaces/comedi_.py", line 55, in _poll                 
    status, output, error = poll_command.run(timeout=timeout)                                               
  File "/local/home/bird/Code/pyoperant/pyoperant/utils.py", line 176, in run                               
    self.process.terminate()                                                                                
AttributeError: 'NoneType' object has no attribute 'terminate'                                              
"                                                                                                           

@neuromusic
Copy link
Member

this seems to be happening during the feed.

there's a timeout on the polling... if the feed duration is longer than the timeout on the polling, maybe that's causing a problem?

@neuromusic
Copy link
Member

@neuromusic
Copy link
Member

more specifically in the borrowed function here https://github.com/gentnerlab/pyoperant/blob/master/pyoperant/utils.py#L156

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

2 participants