gentnerlab / pyoperant

python package for operant conditioning
BSD 3-Clause "New" or "Revised" License
13 stars 15 forks source link

Pyaudio IOError #82

Open neuromusic opened 9 years ago

neuromusic commented 9 years ago
Unhandled exception: Traceback (most recent call last):
  File "/usr/local/bin/behave", line 7, in <module>
    execfile(__file__)
  File "/home/bird/Code/pyoperant/scripts/behave", line 98, in <module>
    main()
  File "/home/bird/Code/pyoperant/scripts/behave", line 95, in main
    behavior.run()
  File "/home/bird/Code/pyoperant/pyoperant/behavior/base.py", line 153, in run
    session=self._run_session)
  File "/home/bird/Code/pyoperant/pyoperant/utils.py", line 100, in run_state_machine
    state = state_functions[state]()
  File "/home/bird/Code/pyoperant/pyoperant/behavior/base.py", line 215, in _run_session
    post=self.session_post)
  File "/home/bird/Code/pyoperant/pyoperant/utils.py", line 100, in run_state_machine
    state = state_functions[state]()
  File "/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 195, in session_main
    run_trial_queue()
  File "/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 161, in run_trial_queue
    self.run_trial()
  File "/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 315, in run_trial
    self.response_main()
  File "/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 445, in response_main
    self.panel.speaker.stop()
  File "/home/bird/Code/pyoperant/pyoperant/hwio.py", line 115, in stop
    return self.interface._stop_wav()
  File "/home/bird/Code/pyoperant/pyoperant/interfaces/pyaudio_.py", line 95, in _stop_wav
    self.wf.close()
  File "/usr/lib/python2.7/wave.py", line 183, in close
    self._i_opened_the_file.close()
IOError: close() called during concurrent operation on the same file object.
neuromusic commented 8 years ago

still no idea what is causing this but @MarvinT has gotten it now, too