Bionic: python3-comedilib module empty

Bug #1797258 reported by Anders Montonen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
comedilib (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu 18.04.1 on AMD64, python3-comedilib 0.10.2-4build7

The installed module is empty and completely non-functional. The Python 2.7 python-comedilib package appears to be OK.

Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import comedi
>>> comedi.MAJOR
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'comedi' has no attribute 'MAJOR'
>>> dir(comedi)
['__doc__', '__loader__', '__name__', '__package__', '__path__', '__spec__']

Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import comedi
>>> comedi.MAJOR
98

Tags: bionic
tags: added: bionic
Revision history for this message
Gudjon I. Gudjonsson (gudjon-gudjon) wrote :

Hi

I have just tested this with the newest version 0.11.0 but I am sure it is the
same for 0.10.2.

python3
Python 3.7.2 (default, Jan 3 2019, 02:55:40)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import comedi.comedi as c
>>> c.MAJOR
98
>>>

Hope this solves your problem

/Gudjon

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in comedilib (Ubuntu):
status: New → Confirmed
Revision history for this message
Éric Piel (Delmic) (piel) wrote :

Hi Gudjon,

I came across the same issue. That's not the intended way that comedi module should be loaded in Python. You should be able to write just "import comedi as c". Right now, this works fine in Python 2, but not in Python 3.

I think that the problem is that comedi.py (and the .so) should be directly placed in /usr/lib/python3/dist-packages/, not in a subdirectory "comedi/". Was there a specific reason that it was done this way in Python 3?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.