[Pythonmac-SIG] appscript CommandError timeout - always before 2**16 transactions, sometimes well before

Ned Deily nad at acm.org
Sat Nov 7 01:18:14 CET 2009


In article 
<2cd46e7f0911061558r330573d0mc5ace6fa1d7b0b77 at mail.gmail.com>,
 ken manheimer <ken.manheimer at gmail.com> wrote:
> the behavior is an appscript.reference.CommandError timeout after some
> number of appscript transactions.  there seems to be a hard limit just
> before 2**16 (65536) commands (actually, at 65529 commands, but i presume
> the difference is accounted for by preliminary setup).  the limit is
> sometimes lower, even across separate python sessions, to somewhere a bit
> above 55,000, and in fact tends to be lower once the high limit has been
> hit.  occasionally the limit is as low as tens or hundreds of transactions,
> at which point working with appscript is untenable and i need to reboot my
> machine to clear it.
[...]
> while i'm curious about the reason for the high hard limit, the reduced
> limits are actually a problem - even the 57000/58000 ceiling interferes with
> my script operation when running against a lot of playlists and tracks
> (88/9300), to the point that i've had to include kludgy measures to work
> around the problem.  i'd love it if the problem could be confirmed by
> others, and if it's widespread, whether someone familiar with appscript
> internals could look into repairing it.

A sync script sounds interesting and I plan to take a look at later.   
But a couple of quick thoughts:

Are you running on 10.6 (Snow Leopard)?  If so, perhaps you are running 
into this bug:

http://db.tidbits.com/article/10643

Also, have you tried increasing the default timeout on the problematic 
commands, i.e. x = t.name.get(timeout=120)?

-- 
 Ned Deily,
 nad at acm.org



More information about the Pythonmac-SIG mailing list