python-pyepl does not run with ImportError: /usr/lib/python2.7/dist-packages/pyepl/hardware/sound/ undefined symbol: snd_pcm_hw_params_set_channels

Bug #1171573 reported by CTW on 2013-04-22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pyepl (Ubuntu)

Bug Description

The package python-pyepl is currently broken on Ubuntu. The same bug appears Precise, Quantal and Raring (but it runs fine on Debian).

I have tried several computers with different versions of Ubuntu with the same result (see also this bug report:

This is the error message when trying to import pyepl:

In [1]: import pyepl
ImportError Traceback (most recent call last)
<ipython-input-1-9dd2e5e550aa> in <module>()
----> 1 import pyepl

/usr/lib/python2.7/dist-packages/pyepl/__init__.pyc in <module>()
     13 """
---> 15 import hardware
     16 import timing
     17 import display

/usr/lib/python2.7/dist-packages/pyepl/hardware/ in <module>()
     23 import rt
     24 import eeg
---> 25 import sound
     27 import pygame

/usr/lib/python2.7/dist-packages/pyepl/hardware/sound/ in <module>()
     11 This package implements sound functions.
     12 """
---> 13 from eplSound import eplSound as EPLSound
     14 import soundFile as SoundFile

/usr/lib/python2.7/dist-packages/pyepl/hardware/sound/ in <module>()
     24 fp.close()
     25 return _mod
---> 26 _eplSound = swig_import_helper()
     27 del swig_import_helper
     28 else:

/usr/lib/python2.7/dist-packages/pyepl/hardware/sound/ in swig_import_helper()
     20 if fp is not None:
     21 try:
---> 22 _mod = imp.load_module('_eplSound', fp, pathname, description)
     23 finally:
     24 fp.close()

ImportError: /usr/lib/python2.7/dist-packages/pyepl/hardware/sound/ undefined symbol: snd_pcm_hw_params_set_channels

One one system I managed (after a lot of trial and error) to recompile and to get it to work, but unfortunately I haven't been able to do that again on a different system.

CTW (ctw) on 2013-04-22
description: updated
description: updated
Stef (stef-struijk) wrote :

From what I could find on the internet, the problem lies in an old python statement in pyEPL (audio part) that doesn't work anymore in Python 2.7 (and up?).

I used an ugly hack to get around the problem, at least for me (I don't need audio for the experiment).
There was some problem with the Audio part of pyEPL, so ... I commented it out :P

Run your python program with EPL and you probably get a list of file_... imports ... from file_...
Go to the last one and comment out that sound related line of code.
It takes a bit of time to comment everything out, because every compile gives a next error, but it won't take forever.

It's ugly, but it's a quick fix ^^

Note: you need sudo right to edit the .py files which are likely in /usr/lib/python2.7/dist-packages/pyepl

p.s. If I have to do this another time I will put here in which files, which lines you have to comment out ;)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pyepl (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers