Python scripts not working
Moderators: MattKingUSA, khz, spamatica
- funkmuscle
- Established Member
- Posts: 2800
- Joined: Mon Jun 02, 2008 2:30 pm
- Has thanked: 129 times
- Been thanked: 31 times
Python scripts not working
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.
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.
-
- Established Member
- Posts: 660
- Joined: Sat Sep 15, 2012 12:36 am
- Has thanked: 36 times
- Been thanked: 105 times
Re: Python scripts not working
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.
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.
-
- Established Member
- Posts: 573
- Joined: Mon Feb 08, 2010 10:38 am
- Has thanked: 80 times
- Been thanked: 97 times
Re: Python scripts not working
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.
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.
MusE DAW
- funkmuscle
- Established Member
- Posts: 2800
- Joined: Mon Jun 02, 2008 2:30 pm
- Has thanked: 129 times
- Been thanked: 31 times
Re: Python scripts not working
Michael tried a few things when I mentioned it to him on FB and he came to the conclusion it was PyQt4 thing.
-
- Established Member
- Posts: 90
- Joined: Mon Mar 17, 2014 8:01 pm
Re: Python scripts not working
Hopefully, They get ported to qt5. It's perplexing how a complete qt5 port would still rely on qt4.
-
- Established Member
- Posts: 573
- Joined: Mon Feb 08, 2010 10:38 am
- Has thanked: 80 times
- Been thanked: 97 times
Re: Python scripts not working
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.
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.
- Attachments
-
- RandomizeVelocityRelative.zip
- (1.53 KiB) Downloaded 50 times
MusE DAW
- funkmuscle
- Established Member
- Posts: 2800
- Joined: Mon Jun 02, 2008 2:30 pm
- Has thanked: 129 times
- Been thanked: 31 times
Re: Python scripts not working
yep that works. thanx. will you be doing that for the other scripts?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.
- funkmuscle
- Established Member
- Posts: 2800
- Joined: Mon Jun 02, 2008 2:30 pm
- Has thanked: 129 times
- Been thanked: 31 times
Re: Python scripts not working
thanx man! before I update, the version setup by milk for Arch, do you know if that's different?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.
Re: Python scripts not working
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.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.
lg,
Michael