gluon / AbletonLive9_RemoteScripts

Unofficial repository for Ableton Live 9 MIDI Remote Scripts by Julien Bayle
http://julienbayle.net/ableton-live-9-midi-remote-scripts/
513 stars 245 forks source link

Python 2.5 imcompatibilities: RemoteScriptError: exceptions must be classes, instances, or strings #21

Open colourcode opened 9 years ago

colourcode commented 9 years ago

Does anybody else see a bunch of these sorts of errors when using this with Live 9.1.6?

RemoteScriptError: exceptions must be classes, instances, or strings

I believe the cause for this is that the decompiled code in this repository (and for that matter any decompiled python code generated with decompyle2) is python 2.7, while Ableton Live has a python 2.5 interpreter and does not understand this exception syntax:

raise foo > 0 or AssertionError

I also noticed that it will throw exceptions when executing this sort of exception handling code:

try:
     something = 0
except Exception as exc:
     pass

Exception as exc syntax is also not supported in python 2.5

NSUSpray commented 7 years ago

You must write this with using comma instead “as”:

try:
     something = 0
except Exception, exc:
     pass
datamafia commented 7 years ago

holy shit 2.5. Is this confirmed or inferred?