Skip to content

concurrent operation on audio file causes behavior to crash #112

@MarvinT

Description

@MarvinT
"2016-04-08 09:50:46,982","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 205, in session_main
    run_trial_queue()
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 162, in run_trial_queue
    self.run_trial()
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 316, in run_trial
    self.response_main()
  File "/local/home/bird/Code/pyoperant/pyoperant/behavior/two_alt_choice.py", line 448, in response_main
    self.panel.speaker.stop()
  File "/local/home/bird/Code/pyoperant/pyoperant/hwio.py", line 115, in stop
    return self.interface._stop_wav()
  File "/local/home/bird/Code/pyoperant/pyoperant/interfaces/pyaudio_.py", line 95, in _stop_wav
    self.wf.close()
  File "/usr/local/anaconda/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions