Python scripts not working

MusE is a MIDI/Audio sequencer with recording and editing capabilities, aiming to be a complete multitrack virtual studio for Linux. http://muse-sequencer.org/

Moderators: khz, MattKingUSA, spamatica

User avatar
funkmuscle
Established Member
Posts: 2208
Joined: Mon Jun 02, 2008 2:30 pm

Python scripts not working

Postby funkmuscle » Tue Feb 05, 2019 5:55 pm

Michael (empowerg) wrote a few Py scripts for velocity and randomizing notes in the drum editor and piano roll(I think as I don't use).
They've stopped working. I've contacted Michael on FB and he said it could be a version thing of the Python.
This is the error I'm getting. I'm using Arch64.
PyQt fail.png
You do not have the required permissions to view the files attached to this post.

Tim E. Real
Established Member
Posts: 181
Joined: Sat Sep 15, 2012 12:36 am

Re: Python scripts not working

Postby Tim E. Real » Tue Feb 05, 2019 8:17 pm

Hi, I get this similar message but a slightly different missing module:

RandomizeVelocityRelative", line 31, in <module>
from PyQt4 import QtGui, QtCore
ImportError: cannot import name 'QtGui'

I am certain it is just a matter of installing the right modules.
I cannot check right now as I have over 3000 package updates but I'm
in the middle of something and it complains that dependencies are missing
so I need to wait until I'm finished my work to install everything at once...

Tim.

spamatica
Established Member
Posts: 193
Joined: Mon Feb 08, 2010 10:38 am

Re: Python scripts not working

Postby spamatica » Tue Feb 05, 2019 9:29 pm

Argh, PyQt4 is getting quite old, could be the packages are no longer complete.. The scripts should be ported to PyQt5, actually, didn't I do that already?! Hmm :S

I'm not that fluent in Arch packaging, as Tim says it could be a missing package, search for more pyqt packages?

It could be a python version issue too, as Michael suggests. If you have several python versions installed maybe not all of them have PyQt installed.

User avatar
funkmuscle
Established Member
Posts: 2208
Joined: Mon Jun 02, 2008 2:30 pm

Re: Python scripts not working

Postby funkmuscle » Wed Feb 06, 2019 3:03 am

Michael tried a few things when I mentioned it to him on FB and he came to the conclusion it was PyQt4 thing.

artofmusic
Established Member
Posts: 61
Joined: Mon Mar 17, 2014 8:01 pm

Re: Python scripts not working

Postby artofmusic » Wed Feb 06, 2019 1:03 pm

Hopefully, They get ported to qt5. It's perplexing how a complete qt5 port would still rely on qt4.

spamatica
Established Member
Posts: 193
Joined: Mon Feb 08, 2010 10:38 am

Re: Python scripts not working

Postby spamatica » Wed Feb 06, 2019 10:55 pm

Ported the script at hand to PyQt5, please find it attached.
I'd propose creating the scripts folder here $HOME/.config/MusE/scripts/ and putting the file there. MusE will find it and display it in the menu.
The file needs to have the executable bit set.
E.g with: chmod +x RandomizeVelocityRelative
You of course need PyQt5 (for python3) installed to get it working.

I'll go through the rest and update them in the repository in a bit.
You do not have the required permissions to view the files attached to this post.

User avatar
funkmuscle
Established Member
Posts: 2208
Joined: Mon Jun 02, 2008 2:30 pm

Re: Python scripts not working

Postby funkmuscle » Thu Feb 07, 2019 12:32 am

spamatica wrote:Ported the script at hand to PyQt5, please find it attached.
I'd propose creating the scripts folder here $HOME/.config/MusE/scripts/ and putting the file there. MusE will find it and display it in the menu.
The file needs to have the executable bit set.
E.g with: chmod +x RandomizeVelocityRelative
You of course need PyQt5 (for python3) installed to get it working.

I'll go through the rest and update them in the repository in a bit.

yep that works. thanx. will you be doing that for the other scripts?

spamatica
Established Member
Posts: 193
Joined: Mon Feb 08, 2010 10:38 am

Re: Python scripts not working

Postby spamatica » Thu Feb 07, 2019 4:02 pm

funkmuscle wrote:yep that works. thanx. will you be doing that for the other scripts?

Yes that was my plan.

spamatica
Established Member
Posts: 193
Joined: Mon Feb 08, 2010 10:38 am

Re: Python scripts not working

Postby spamatica » Thu Feb 07, 2019 6:01 pm

So, there. I've gone through all the midi scripts and updated them to PyQt5 where applicable. Added to git in the main/master branch. :)

User avatar
funkmuscle
Established Member
Posts: 2208
Joined: Mon Jun 02, 2008 2:30 pm

Re: Python scripts not working

Postby funkmuscle » Thu Feb 07, 2019 6:04 pm

spamatica wrote:So, there. I've gone through all the midi scripts and updated them to PyQt5 where applicable. Added to git in the main/master branch. :)

thanx man! before I update, the version setup by milk for Arch, do you know if that's different?

empowerg
Established Member
Posts: 28
Joined: Sun Apr 03, 2016 12:36 pm
Contact:

Re: Python scripts not working

Postby empowerg » Thu Feb 07, 2019 7:00 pm

funkmuscle wrote:Michael tried a few things when I mentioned it to him on FB and he came to the conclusion it was PyQt4 thing.


OMG, I did forget completely about this, sorry. I should be in my holiday, but then stuff started happening and this slipped completely from my mind, sorry.

lg,
Michael


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 3 guests