Wednesday, September 30, 2020

#1 2011-07-08 11:37:18 am

joeljar
Member
Registered: 2011-07-05
Posts: 2

Error -54 File permission error

I have been using applescript to manage a couple of parameters in my iTunes library, mostly the key which is represented by the Camelot scale(mixed in key) in the comments and tempo. I have found the easiest way to do this with WAV files(it is iTunes after all) is through a variety of applescripts and one that runs them all. About a week or two ago it started returning with "error "iTunes got an error: File permission error." number -54"

Script examples: key 2B

tell application "iTunes"
set sel to every track of playlist "2B"
set comments to "2B"
set sel to a reference to every track of playlist "2B"
set appendum to "2B"
repeat with this_track in sel
set this_track's comment to "2B"
end repeat
end tell

Script examples: Tempo 106

tell application "iTunes"
set sel to every track of playlist "106"
set comments to "106"
set sel to a reference to every track of playlist "106"
set appendum to "106"
repeat with this_track in sel
set this_track's bpm to "106"
end repeat
end tell

I was also wondering if there is a simple way to migrate all those playlists to a playlist folder? It would not be difficult to move the playlists I'm just wondering what I would have to do with the applescript. That is obviously much less important but would be helpful if it isn't to much work.

By the way, OS 10.6.7
iTunes 10.3.1

Thanks

Offline

 

#2 2011-07-09 12:42:56 am

regulus6633
Member
From:: Taulov, Denmark
Registered: 2006-11-02
Posts: 1695
Website

Re: Error -54 File permission error

The explanation for error number -54 is: "permissions error (on file open)". Maybe that gives you more of a clue. Its not an itunes error, it's an error from the Carbon framework and can be found in the file "MacErrors.h".

A comment about your example code. It could be written better like this. The other lines don't do anything...

Applescript:

tell application "iTunes"
   set sel to a reference to every track of playlist "2B"
   repeat with this_track in sel
       set this_track's comment to "2B"
   end repeat
end tell

Offline

 

#3 2011-07-09 08:23:44 am

joeljar
Member
Registered: 2011-07-05
Posts: 2

Re: Error -54 File permission error

Thanks much! It was the first time I spent any real time on an applescript project so the code is pretty questionable.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)