Rename Script Failing

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Rename Script Failing Fri Apr 28, 2017 10:43 pm • by qPs1
iI have a directory where music files are downloaded and stored in separate folders. I created a small script to rename the files in the folders based on id3 tags.

The script is the following

/usr/local/bin/eyeD3 --rename '$artist - $album - $track:num - $title' "$1"

I setup the rules to go down into each subfolder and then run the script of files with extension mp3. The script works when I run it manually but fails when run by Hazel.

The following are the errors that I receive

2017-04-28 22:18:00.845 hazelworker[56895] [Error] Shell script failed: Error processing shell script ...../scripts/renameMP3 on file example filename.mp3.
2017-04-28 22:18:00.845 hazelworker[56895] Shellscript exited with non-successful status code: -900
2017-04-28 22:18:00.846 hazelworker[56895] example filename.mp3: Rule Rename Files matched.
2017-04-28 22:18:00.847 hazelworker[56895] Exception caught while executing shell script: Couldn't posix_spawn: error 8

after getting those errors a bunch of times it starts to spit out these errors

2017-04-28 22:18:00.908 hazelworker[56895] Daniel Freedman - Imagine That - [~:19] - ": Rule MP3 Rename matched.
2017-04-28 22:18:00.908 hazelworker[56895] Received error while processing file (null): Error Domain=NSCocoaErrorDomain Code=256 "(null)" UserInfo={NSURL=file:///............./Daniel%20Freedman%20-%20Imagine%20That%20-%20%5B~:19%5D%20-%20%22, NSFilePath=............./Daniel Freedman - Imagine That - [~:19] - ", NSUnderlyingError=0x7fc5fa16b150 {Error Domain=NSPOSIXErrorDomain Code=24 "Too many open files"}}

Any ideas as to what I'm doing wrong?
qPs1
 
Posts: 1
Joined: Fri Apr 28, 2017 10:30 pm

Re: Rename Script Failing Mon May 01, 2017 10:17 am • by Mr_Noodle
It seems you have too many files open on your system. There could be many reasons for that but to step back a bit, is there a reason why you are using a script to do this? Most id3 tags should be available via Spotlight (and therefore Hazel) so it should be doable without a script.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support