File permission error? (mp3 encoding)

Ask questions and get answers on how to make Max behave.

Re: File permission error? (mp3 encoding)

Postby jordyn » Sun Oct 21, 2007 8:35 pm

I was also using Max 0.7.1 for the first time, to convert downloaded FLAC files to MP3. I selected Best for MP3 and output to iTunes, but made no other changes. Got the same intermittent iTunes file permission error.

MacBook Pro, OS 10.4.10, iTunes 7.4.2
jordyn
 
Posts: 1
Joined: Sun Oct 21, 2007 8:20 pm

Re: File permission error? (mp3 encoding)

Postby shaun3000 » Mon Dec 03, 2007 9:48 pm

I found this on the iLounge forums. I don't know if it's the same problem or not:
http://forums.ilounge.com/showthread.ph ... ost1092312
This is a reported error and has been fixed in Join Together v5.1.2, to be released on April 5, 2007.

The -54 is a file open error. iTunes is too busy examining the just-added joined file for volume information, so that the routine in Join Together that applies tags cannot be completed. The fixed version waits for iTunes to finish this process and then applies the tags after iTunes closes the file.
shaun3000
 
Posts: 2
Joined: Mon Dec 03, 2007 9:45 pm

Re: File permission error? (mp3 encoding)

Postby BolivarBaLues » Fri Dec 21, 2007 4:10 pm

I was really disappointed upon awaking this morning to discover that the hundreds of FLAC files I had hoped would be converted to MP3 and added to my iTunes library were still in queue because I apparently have to acknowledge the permissions error before Max will proceed. What a drag. But I seem to have resolved this problem. I know nothing about programming, Apple Script or really anything to with computers, but logic tells me that if your right eye offends, then lop the bastard off. So in this case, it is the process of tagging the file that results in a permissions error. Ergo, I trashed the part of the "Add To iTunes Library" AppleScript that appears to deal with tagging the files.

if album_name is not equal to "" then
set album of audio_item to album_name
end if

if artist_name is not equal to "" then
set artist of audio_item to artist_name
end if

if composer_name is not equal to "" then
set composer of audio_item to composer_name
end if

if genre_name is not equal to "" then
set genre of audio_item to genre_name
end if

if track_year is not equal to 0 then
set year of audio_item to track_year
end if

if comment_string is not equal to "" then
set comment of audio_item to comment_string
end if

if track_title is not equal to "" then
set name of audio_item to track_title
end if

if track_number is not equal to 0 then
set track number of audio_item to track_number
end if

if track_total is not equal to 0 then
set track count of audio_item to track_total
end if

if is_compilation is not equal to no then
set compilation of audio_item to is_compilation
end if

if disc_number is not equal to 0 then
set disc number of audio_item to disc_number
end if

if disc_total is not equal to 0 then
set disc count of audio_item to disc_total
end if


I deleted all of the above (after renaming the original script to "Add to iTunes Library.scpt.old" just in case I needed to backtrack) and saved the modified script. Voila! Works like magic. There may be some function that is important to someone out that that suffers as a result of this modification, but for my needs everything works just fine. The tags I enter into the "metadata" fields appear in the file and even the album art works. So apparently all of that bit I hacked off of the script was not necessary in the first place, and was just mucking up the process with permissions errors.
BolivarBaLues
 
Posts: 1
Joined: Fri Dec 21, 2007 3:59 pm
Location: The Land of Dixie

Re: File permission error? (mp3 encoding)

Postby kwbrown » Sat Dec 29, 2007 7:54 pm

I have solved this problem by editing Add to iTunes Library.scpt to add a delay before doing any tagging:

on add_file_to_itunes_library(filename, playlist_name, album_name, artist_name, composer_name, genre_name, track_year, comment_string, track_title, track_number, track_total, is_compilation, disc_number, disc_total)

set audio_file to alias (POSIX file filename)
tell application "iTunes"

set library_source to first source whose kind is library
set audio_item to (add audio_file to library_source)

delay 10

if playlist_name is not equal to "" then
set the_playlist to my get_playlist(playlist_name)
duplicate audio_item to the_playlist
end if
--snip--

A 10 second delay seems to work just fine on my MBP, although I think the delay could be significantly shortened to like 2-3 seconds. I've never used Applescript before, so there may be a better way to fix this problem. I tried to use the method that Join Together used to solve this problem, but I was unable, as it is closed source. A better fix would be to wait for iTunes to finish importing the file.
kwbrown
 
Posts: 2
Joined: Sat Dec 29, 2007 7:42 pm

Re: File permission error? (mp3 encoding)

Postby db » Sun May 18, 2008 11:54 am

If you uncheck iTunes -> Add output files to iTunes library you can avoid this problem (but then you have to manually add the encoded tracks).

However, it is very annoying and should be fixed. I will have a look at the script that performs the actual adding and see if I can figure out the problem.

--
http://henrik-stigell.blogspot.com/
db
 
Posts: 6
Joined: Thu Jul 13, 2006 8:59 pm

Re: File permission error? (mp3 encoding)

Postby RonaldPR » Sun May 18, 2008 3:33 pm

Is this problem still in Max 0.8.1? With Max 0.8.1 I have recently converted from flac to mp3 15 albums with a total of 262 tracks in one batch, letting Max add the tracks directly to iTunes, and I have not encountered the problem.
(Alu Intel iMac with 10.4.11)
RonaldPR
 
Posts: 421
Joined: Tue May 30, 2006 8:27 am
Location: Amsterdam, Netherlands

Re: File permission error? (mp3 encoding)

Postby bhawkins » Sun Jun 15, 2008 12:31 am

I'm getting this error in Max 0.8.1 on OS X 10.4 with iTunes 7.6.2 (9). The tweak from kwbrown works every time at 3 seconds (and there is no delay in net encoding time, because each track is handled on a separate thread). I think this delay ought to be part of the dist, if there is no real solution to the iTunes API bug that is causing the error.

Thanx for the nice util. :D
bhawkins
 
Posts: 2
Joined: Sun Jun 15, 2008 12:23 am

Re: File permission error? (mp3 encoding)

Postby siginx75 » Tue Mar 31, 2009 2:25 pm

Hi all,

I'm new to the forum, but I use Max quite a lot. I'm getting the same file permission error. I'd like to try kwbrown's solution, but I'm having trouble locating "Add to iTunes Library.scpt". I've searched my iTunes folders and all of my computer using Finder, but I can't locate that .scpt file. Either I'm not looking hard enough, or the file isn't there to begin with (do I have to download it from somewhere?). Any help is appreciated. Thanks!
siginx75
 
Posts: 3
Joined: Tue Mar 31, 2009 2:18 pm

Re: File permission error? (mp3 encoding)

Postby RonaldPR » Tue Mar 31, 2009 2:51 pm

It is inside Max application package:
Max.app/Contents/Resources/Add to iTunes Library.scpt
RonaldPR
 
Posts: 421
Joined: Tue May 30, 2006 8:27 am
Location: Amsterdam, Netherlands

Re: File permission error? (mp3 encoding)

Postby siginx75 » Tue Mar 31, 2009 4:50 pm

Great, I'll take a look. Funny that Finder didn't locate it.

Many thanks.
siginx75
 
Posts: 3
Joined: Tue Mar 31, 2009 2:18 pm

Re: File permission error? (mp3 encoding)

Postby RonaldPR » Tue Mar 31, 2009 7:01 pm

If you want the Finder to show files inside a package, you need to choose 'Show Package Contents" from the contextual menu. A search in the Finder will not find files that the average user is supposed to keep his hands off, so it will not find package contents (and not most System files either.)
RonaldPR
 
Posts: 421
Joined: Tue May 30, 2006 8:27 am
Location: Amsterdam, Netherlands

Re: File permission error? (mp3 encoding)

Postby siginx75 » Tue Mar 31, 2009 9:53 pm

Gotcha. I'll check things out when I get home. Thanks again.
siginx75
 
Posts: 3
Joined: Tue Mar 31, 2009 2:18 pm

Re: File permission error? (mp3 encoding)

Postby Fuga » Fri Apr 24, 2009 7:44 pm

Am I right? This has been a known problem but since the fix was found in 2007 (by a user) there has been no fix to the app so that we all don't have to do it ourselves? I have never done the auto add to iTunes thing until now (April, 2009) only to get bit by it. Am using the latest v.8.1 from October '08.

Someone please tell me I'm wrong and point me somewhere else. I'm certainly capable of editing the script but between my fat fingers and some rum it'd be better for someone else to do it so we don't all stumble over ourselves.
User avatar
Fuga
 
Posts: 382
Joined: Mon Jun 05, 2006 8:30 pm
Location: Texas

Re: File permission error? (mp3 encoding)

Postby zorzal » Sat Apr 25, 2009 11:51 pm

April 25, 2009. The problem is still there, and it unbelievable obnoxious... The scenario should be quite common: lots of us have arge numbers of .flac or .ape files that need conversion, lots of us want to have them inside iTunes. Further, looking at Max's implementation, it looks like it was designed precisely for such scenarios, where a large number of files is selected, settings are chosen, conversion started... and go get sleep, or coffee, or whatever...

From what a user found, this is not rocket science, since even I can understand what the code changes say... Can I please request that this issue were bumped up in priority? Please understand other users' trepidation at editing the script, I feel like I may be braking a zillion other things that I don't know about.

Thanks for your efforts, guys, you are doing an awesome job with Max! :D
zorzal
 
Posts: 1
Joined: Sat Apr 25, 2009 11:43 pm

Re: File permission error? (mp3 encoding)

Postby sounddroid » Sun May 17, 2009 6:55 pm

OK, I finally figured this out. If you simply disable "Sound Check" in the Playback preferences in iTunes, you won't get this error. You only have to disable it while you're doing a conversion with MAX - once it's done converting and importing into iTunes, you can turn it back on. Must have something to do with iTunes and MAX trying to write to the file at the same time.
sounddroid
 
Posts: 1
Joined: Sun May 17, 2009 6:51 pm

PreviousNext

Return to Max Help

Who is online

Users browsing this forum: No registered users and 3 guests