went to ubutu studio 18.04 and now mididings doesn't work!

71 views
Skip to first unread message

Patrick Thrasybule

unread,
Jan 18, 2020, 1:39:51 PM1/18/20
to mididings
ImportError: dynamic module does not define init function (init_mididings)

python '/home/mrthraz/control.py'
Traceback (most recent call last):
  File "/home/mrthraz/control.py", line 1, in <module>
    from mididings import *
  File "/usr/lib/python2.7/dist-packages/mididings/__init__.py", line 13, in <module>
    from mididings.setup import config, hook
  File "/usr/lib/python2.7/dist-packages/mididings/setup.py", line 13, in <module>
    import _mididings
ImportError: dynamic module does not define init function (init_mididings)

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 18, 2020, 3:15:06 PM1/18/20
to mididings
Hi, how did you install the program? Built from the lastest version (master branch) ? Or with apt get ?

Patrick Thrasybule

unread,
Jan 18, 2020, 5:53:08 PM1/18/20
to mididings











anyone know how to fix this?








Patrick Thrasybule

unread,
Jan 18, 2020, 5:54:09 PM1/18/20
to mididings
with synaptic

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 18, 2020, 6:06:11 PM1/18/20
to mididings
The best is to clone the repository and compile the application from ground zero, synaptic, I'm sure, will install the 2012 version

Patrick Thrasybule

unread,
Jan 19, 2020, 8:19:34 AM1/19/20
to mididings
thank you so much, working on it now.

Patrick Thrasybule

unread,
Jan 19, 2020, 8:54:12 AM1/19/20
to mididings
Now its telling me it cant can't find alsa, alsa is definitely installed.

mrthraz@Satellite-P845:~/mididings-master$ '/home/mrthraz/mididings-master/setup.py' build
couldn't find package 'alsa'
mrthraz@Satellite-P845:~/mididings-master$ sudo '/home/mrthraz/mididings-master/setup.py' build
[sudo] password for mrthraz:
couldn't find package 'alsa'

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 19, 2020, 9:30:19 AM1/19/20
to mididings
Patrick, 

Even with ALSA installed, when we compile an application, it sometimes need libraries. That's the case of Mididings.

I have updated my Wiki on how I build Mididings, take a look and you will find what dependencies you have to install before runing setup.py

Also, add the --disable-jack-midi if you don't install the Jack lib


Good luck !

Patrick Thrasybule

unread,
Jan 19, 2020, 3:43:48 PM1/19/20
to mididings
ok, i did a build and install.

but i'm still getting:

mrthraz@Satellite-P845:~/mididings-master$ python /home/mrthraz/control.py
Traceback (most recent call last):
  File "/home/mrthraz/control.py", line 1, in <module>
    from mididings import *
  File "/usr/local/lib/python2.7/dist-packages/mididings/__init__.py", line 13, in <module>

    import _mididings
ImportError: dynamic module does not define init function (init_mididings)

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 19, 2020, 3:59:06 PM1/19/20
to mididings
The good news is that you now have the latest version of mididings.


Scroll down until first message, there is a setup.py.fixed link.

Let me know if it works, I will document it in my Wiki !

Patrick Thrasybule

unread,
Jan 19, 2020, 4:53:00 PM1/19/20
to mididings
ok, i uninstalled mididings.

i replaced setup.py with setup.py.fixed.

then ran build and install.


then i tried running my script again.



doesn't seem to work


mrthraz@Satellite-P845:~/mididings-master$ python /home/mrthraz/control.py
Traceback (most recent call last):
  File "/home/mrthraz/control.py", line 1, in <module>
    from mididings import *
  File "/usr/local/lib/python2.7/dist-packages/mididings/__init__.py", line 13, in <module>
    import _mididings
ImportError: dynamic module does not define init function (init_mididings)

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 19, 2020, 5:00:49 PM1/19/20
to mididings

Patrick Thrasybule

unread,
Jan 19, 2020, 5:31:14 PM1/19/20
to mididings
i tried it.

didn't work.

also it appears to be the same fix.

its just commenting out "compiler.

compiler_so.append('-fvisibility=hidden')

"

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 19, 2020, 5:47:50 PM1/19/20
to mididings
That sucks ! 

I have a Ubuntu 18.04.3 LTS box and I will clone and build Mididings and if I have the same error, I will find the fix. Mididings should run on 18.04 version flawlessly

I'll be back ...

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 20, 2020, 5:53:14 PM1/20/20
to mididings
Hi,

I have built Mididings using my procedure on my Ubuntu 18.04 box and didn't have any issue making it works... But I had to get rid of PulseAudio

I think your problem is outside Mididings, can it be related to Python?

Are you able to get Mididings version from CLI ?

stefets@PC0-LINUX:~/live-config/bin$ mididings --version
mididings 2015+rbbec99a, using Python 2.7.17

Thanks

Patrick Thrasybule

unread,
Jan 21, 2020, 6:38:45 AM1/21/20
to mididings
This is a fresh install of Ubuntu studio 18.04.

The python ver is what came with the ISO.

The only thing nonstandered is the kxstudio repo's I added. Which are just plugins for the most part.

Oh and I'm running unity desktop.

I think the python ver is 2,7.

I'm at work so I can't check now.

I am running pulse audio and I do need it.

Why did you have to uninstall it?

STEFETS - https://github.com/stefets/live-config/

unread,
Jan 21, 2020, 10:28:50 AM1/21/20
to mididings
That's so strange it don't work on your system.

I get rid of PulseAudio because it locks the ALSA sequencer and I don't need it anyway...

If I get new idea to fix your problem I'll post back here

jeremy...@gmail.com

unread,
Jan 26, 2020, 5:17:38 AM1/26/20
to mididings
Hi Patrick,
I encounter the same problem "dynamic module does not define init function" on ubuntu 18.04.3 LTS with mididings package from apt

and rebuilding mididings at first didn't fix the issue
but applying the fix suggested by Stefets fixed the issue


here are the requirements I had to install
sudo apt-get install libboost-all-dev libglib2.0-dev libasound2-dev
sudo pip install decorator

and commands I run to build
/setup.py build --disable-jack-midi
sudo ./setup.py install --disable-jack-midi

and now mididings works like a charm

maybe two tips on why you're still geeting the problem, which on my side make me though at first the fix wasn't fixing anything
  • do purge the mididngs apt package
  • be sure to clear "build" folder in mididings source folder once you apply the fix, to rebuild everything with it
Good luck, and thanx Stefets for the fix

Patrick Thrasybule

unread,
Apr 15, 2020, 4:24:46 AM4/15/20
to mididings

STEFETS - https://github.com/stefets/live-config/

unread,
May 4, 2020, 3:10:36 PM5/4/20
to mididings
Great !
Reply all
Reply to author
Forward
Message has been deleted
0 new messages