14

How can I see script errors for my python MIDI Remote Scripts in Ableton Live? I've seen references online to a hidden Python console, but no documentation on how to open it, if it would even help me!

Currently I type code, reload the script, and see what happens. If nothing happens, then something is wrong. Very tedious...

Edit: I should also point out that there isn't anything useful in the Log.txt file either, yet that file is being updated.

pje
  • 21,801
  • 10
  • 54
  • 70
Brad
  • 159,648
  • 54
  • 349
  • 530
  • I am awarding the bounty to slomojo, as it might as well go to someone for their efforts. Please though, if you know how to get that console up, post the answer here. – Brad Nov 02 '10 at 13:28
  • I'll get my Ableton setup running again and try and find it. – ocodo Nov 02 '10 at 22:48
  • Thanks slomojo! If you have any ideas on how I could search for it, I'd dig too. I just don't have a clue. I know almost nothing of Python. I'm typically a .NET guy. Thanks again. – Brad Nov 02 '10 at 23:00

6 Answers6

4

For the sake of completeness: on Mac OS X 10.9, the Log.txt file is in

/Users/-username-/Library/Preferences/Ableton/Live 9.1/

The Live 9.1 folder may of course be different for different versions of Live.

Note the Library folder is hidden. It took me a while to figure that out. An easy way to access it with Finder: click the Go menu item, then hold Alt and the Library folder will pop into the menu

Mattijs
  • 1,909
  • 3
  • 19
  • 28
4

To debug the control surface, you can define your own log method like so:

def log(self, message):
    sys.stderr.write("LOG: " + message.encode("utf-8"))

Usage example:

year = 1999
self.log("I'm gonna party like it's " + str(year))

This will append

21179419 ms. RemoteScriptError: LOG: Tonight I'm gonna party like it's 1999

to your Log.txt.

Also, it may be worth knowing that (at least as of Live 9.1) edited control surface files are recompiled every time you load a new song, no need to restart the application.

EDIT: changed the stderr write method so that it doesn't write two lines and an extra return for every log

Mattijs
  • 1,909
  • 3
  • 19
  • 28
4

I use the log.txt for a ton of debugging. It is a little hard to read, but here's my tips.

log writes top down (new info is on next line) and records all the events, more or less.

If you get an error you will get a large hex looking block - about 20+ lines looking like this:

280 ms. Exception: 0x00495580:0x00000000

Right above that block is the error or what may have thrown the script in the Ableton run time.

As you travel UP from that exception you will see something like a trace.

also - you can use :

self.log_message("STUFF")

to write into the log (there are other methods).

I have seen some log file parsers (real time) in my work. Not tried them yet.

Hope that hleps a little. O was ablt to write a PHP app for the python (yeah, sinful I know). http://modrn.dj/app

Marc
  • 1,895
  • 18
  • 25
2

what about http://remotescripts.blogspot.com/2010_03_01_archive.html

Kalpesh Soni
  • 6,879
  • 2
  • 56
  • 59
1

This has certainly changed over the years with different versions of Ableton Live.

I'm running Live 8 and first tried to get the LiveAPI stuff to spit out debug information: http://post.monome.org/comments.php?DiscussionID=4607&page=1

I started with an older version that didn't work with OSX, reported here: http://code.google.com/p/liveapi/issues/detail?id=4 I don't think the new version includes the telnet console.

SO, the best answer is to find a log file here, which contains debug information on a problematic MIDI Remote Scripts:

Library/Preferences/Ableton/Live 8.2.1/Log.txt

edwardsharp
  • 1,232
  • 10
  • 17
0

You can also use http://julienbayle.net/ableton-live-9-midi-remote-scripts for Ableton Live 9

gluon
  • 662
  • 1
  • 10
  • 18
  • 1
    Thanks for the link, but this does not answer my question at all. I was interested in debugging my own scripts. – Brad Mar 06 '13 at 15:30
  • I still didn't upload that part. – gluon Mar 06 '13 at 18:39
  • 1
    I still didn't upload that part. There is a file named Log.txt in /Users//Library/Preferences/Ableton/Live x x x/ There are ALL debugging info of Live. If you want to debug your python via the Framework log_message method, you can use something like self.log_message() ... That should answer.. – gluon Mar 06 '13 at 18:46
  • Could you edit your answer to contain this information? We prefer answers to stand on their own, and not require people to visit another site. This makes it easier to find a solution, and protects against link rot (which is a serious issue as the site grows older). – Brad Larson Mar 07 '13 at 02:53