Skip to content

Troubleshooting (pecking test)

William Wood edited this page Nov 2, 2020 · 11 revisions

Issues when operating pecking test boxes

Pecking test no sound

This can happen when the program runs but sound doesn't come out. It is not clear what can cause this or if there are several underlying causes. Things to check

  1. Check sound test ("System settings") and test left and right audio. They should each come out of different operant boxes.

  2. Open a browser window and play a video on YouTube to see if it is a hardware issue (sometimes browser can work and others cannot)

  3. Programs to investigate and reboot or even reinstall: alsa, pulseaudio, udev

  4. Check /etc/asound.conf, it should be referencing a device at hw:2,0. Sometimes this can be changed automatically I think. When the computers get restarted sometimes the devices get assigned hw:1,0 instead of hw:2,0. I can't currently remember how to find out where they are assigned, but you can try changing asound.conf to see if it fixes it.

Pecking test crashing upon start with this error:

  File "/home/fet/scripts/pecking_test", line 176, in <module>
    args.func(args)
  File "/home/fet/scripts/pecking_test", line 15, in run
    run_pecking_test(args)
  File "/home/fet/python_path/pyoperant/tlab/pecking_test.py", line 330, in run_pecking_test
    os.symlink(parameters["experiment_path"], data_link)
OSError: [Errno 17] File exists

This means that the link to the subject directory (I think that’s the one) already exists. The program makes and deletes that link everytime but sometimes the link remains and won't get deleted. You just need to delete the link and it should be fine afterwards. The path will be something like: /home/fet/data/XXXGre0007M/280920 (the folder name should be today's date) You can type ls -l in the home directory and this should show the folders.

Pecking test crashing

We commonly see this error, which crashes the pecking test and must be manually restarted:

"2019-02-19 13:47:19,167","INFO","Finishing session 1 at Tue Feb 19 13:47:19 2019"
"2019-02-19 13:47:19,167","INFO","Finished all sessions."
"2019-02-19 13:47:19,474","INFO","Exiting Session state"
"2019-02-19 13:47:19,474","CRITICAL","IOError('close() called during concurrent operation on the same file object.',)"
"2019-02-19 13:47:19,475","INFO","Exiting Idle state"
"2019-02-19 13:47:19,475","CRITICAL","IOError('close() called during concurrent operation on the same file object.',)"
"2019-02-19 13:47:19,476","ERROR","Unhandled exception: Traceback (most recent call last):
 File "/home/fet/bin/pecking_test", line 171, in <module>
   args.func(args)
 File "/home/fet/bin/pecking_test", line 15, in run
   run_pecking_test(args)
 File "/home/fet/python_path/pyoperant/tlab/pecking_test.py", line 193, in run_pecking_test
   exp.run()
 File "/home/fet/python_path/pyoperant/behavior/base.py", line 548, in run
   self._idle.start()
 File "/home/fet/python_path/pyoperant/states.py", line 95, in start
   state.run()
 File "/home/fet/python_path/pyoperant/states.py", line 180, in run
   return self.experiment.session.start()
 File "/home/fet/python_path/pyoperant/states.py", line 95, in start
   state.run()
 File "/home/fet/python_path/pyoperant/states.py", line 137, in run
   self.experiment.session_main()
 File "/home/fet/python_path/pyoperant/behavior/base.py", line 572, in session_main
   trial.run()
 File "/home/fet/python_path/pyoperant/trials.py", line 117, in run
   self.experiment.response_main()
 File "/home/fet/python_path/pyoperant/behavior/go_no_go_interrupt.py", line 141, in response_main
   self.panel.speaker.stop()
 File "/home/fet/python_path/pyoperant/components.py", line 587, in stop
   return self.output.stop(event=self.event)
 File "/home/fet/python_path/pyoperant/hwio.py", line 431, in stop
   return self.interface._stop_wav(event=event, **self.params)
 File "/home/fet/python_path/pyoperant/interfaces/pyaudio_.py", line 156, in _stop_wav
   self.wf.close()
 File "/home/fet/anaconda2/envs/pecking_test/lib/python2.7/wave.py", line 187, in close
   file.close()
IOError: close() called during concurrent operation on the same file object.

We have yet to figure this out, but for now we just should take note that it happened and restart the pecking test.

Another error results in the key getting stuck on and the pecking test crashing (identified Oct 2020). We haven't solved why but it looks like this:

ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
"2020-10-28 11:01:41,123","ERROR","Unhandled exception: Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
TypeError: 'tuple' object is not callable
"
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
"2020-10-28 11:01:41,135","ERROR","Unhandled exception: Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
TypeError: 'tuple' object is not callable
"
ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
"2020-10-28 11:01:41,146","INFO","Trial 24 - 11:01:41 - Unrewarded - /home/fet/stimuli/shaping_songID/box5/nonreward/Track5long.wav"
"2020-10-28 11:01:41,147","ERROR","Unhandled exception: Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
TypeError: 'tuple' object is not callableALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
"2020-10-28 11:01:41,123","ERROR","Unhandled exception: Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
TypeError: 'tuple' object is not callable
"

We don't know what causes this right now either. But you need to find and kill the pecking_test process that froze. Double check that the file /etc/asound.conf matches this asound.conf. If it doesn't (most likely the line that says channels 1 should be channels 2), make that change and then restart alsa with

$ sudo /etc/init.d/alsa-utils stop
$ sudo alsa force-reload
$ sudo /etc/init.d/alsa-utils start 

Audio output issues

Audio is played from chubbyninja and pumpkin through USB soundcards, through an amplifier, and out of speakers in Boxes 2, 3, 5 and 6.

Test pecking test audio

$ pecking_test test_audio <box-number>

If the above command raises an error that looks like

pyoperant.errors.InterfaceError: could not find pyaudio device speaker1 then something with alsa (ubuntu sound manager) might be messed up. You can reload the alsa configuration with the following commands

$ sudo /etc/init.d/alsa-utils stop
$ sudo alsa force-reload
$ sudo /etc/init.d/alsa-utils start 

If force-reload isn't reloading everything you may want to try unplugging and replugging the sound card, this has worked in the past.

Missed pecks and double pecks

Right now double pecks should be removed during data analysis by identifying peck events that occur too closely in time (less than 200ms might be a good threshold).

Contents

General

Calendars and scheduling
Lab funds and purchases
Advising, Social Justice, Sexual Harassment, and Real World Shit * Support Resources

Dry lab

Getting connected to the lab network
Data storage and access
Computing
Working Remotely
Other Services

Wet lab

Animal Care

Husbandry, who to call, recordkeeping
Bird care links

Behavior

Pecking Test (NAF 125)
Field Station

Surgeries, Histology, Imaging

Protocols, "how to"s, techniques, and recipes
Instructions for individual pieces of equipment
Imaging

Electrophysiology

Instructions
Hardware, software, and techniques for ephys

Calcium imaging

* Ca imaging Notes

fMRI

Data Collection
Data Analysis

Theory

Modulations

STRFs

Other




Old pages:

Wetlab


Pages in progress:

Clone this wiki locally