New Version: Copytags 2.2 (2008-07-18) [MM3]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Miki
Posts: 141
Joined: Sun Mar 19, 2006 7:01 am
Location: England

Post by Miki »

Image

Then:
Error happened during script execution:
The system cannot find the file specified.

It looks like the tag is tracked in the library, but as soon as i select it again, the tag info dissapears.

Im getting this error, when using v1.6.
The track im trying to paste the tags to is an unprotected m4a file, could this be the problem?
Other than that, great script! :)
Maaspuck
Posts: 156
Joined: Thu Dec 28, 2006 4:41 am
Location: Hamburg, Germany

Your problem

Post by Maaspuck »

Hi Miki,

I am sorry to read about your error using the script. The use of *.m4a files might be a problem in general but I don't think this target file format is responsible for the error you got.

Let me first describe what happens in line 1036. While developing the script it was a great problem to include picture files into mp3 files. The most probable reasong for these problems was a timing problem between the script and the system. Maybe the script started further steps though the system wasn't ready due to file access operations. Therefore i used to show a small MessageBox and the user had to accept this box for every file. This solved the timing problem. Later I found out that calling another script by using the 'WShell.Run' command also solved the timing problem without a nasty messagebox.
Because I don't want every user to copy two scripts, my script generates the wait.vbs file, which is called in line 1036. This is done during the startup of the MediaMonkey.

At the moment I have three ideas where your error could come from:
a) There is an installation problem with the WSH (Windows Scripting host) and thus the 'WShell.Run' command doesn't work on your system.
b) There is a problem while the 'wait.vbs' is created. After starting the MediaMonkey a subdirectory 'CopyTags' should be created in your application folder. In your case this seems to be 'C:Program files\MediaMonkey\Scripts\CopyTags\'. Also an 'CopyPasteTags.ini' should be found in this subdirectory. Can you tell me whether these files are present in your system? Maybe this is a localization problem.
c) Are you using MM3 beta? I also encountered problems with this version exact in line 1036 "Couldn't wait for process'. I have to find a workaround for this. Untill then I recommend to use the script with MM2x.

Coming back to the m4a format:
As the script uses MediaMonkey commands to retag the sound files, it should work with every format the MM supports. But BE CAREFUL with the Albumart. As the scripts includes the Albumart directly by sequentially reading the files and including the picture data, it can't work with other files than mp3... at the moment...

Regards

Maaspuck
Last edited by Maaspuck on Thu Apr 05, 2007 12:46 pm, edited 1 time in total.
Maaspuck
Posts: 156
Joined: Thu Dec 28, 2006 4:41 am
Location: Hamburg, Germany

Thx

Post by Maaspuck »

Hi Bex,

thx a lot.

Regards

Maaspuck
Miki
Posts: 141
Joined: Sun Mar 19, 2006 7:01 am
Location: England

Post by Miki »

b) both them files are present, and in the correct directories

c) no, im using 2.5.5.966, i can update to the newest, newest version if you want to see if it works?
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

mm 2.5x does not support tagging of mp4/m4a/aac files.

and yes you should update to 998 as there are several important fixes that were done.
Miki
Posts: 141
Joined: Sun Mar 19, 2006 7:01 am
Location: England

Post by Miki »

Updated to the newest version, 998.

Still doesnt work, even with MP3's.

It does the first track, then gives that same error.

I seem to recall that it worked with the previous version, so i'll see if i still have a copy of it.

Can you link to the previous version aswell please, incase i cant find the copy, as its an excellent script!

Cheers, Mike
Maaspuck
Posts: 156
Joined: Thu Dec 28, 2006 4:41 am
Location: Hamburg, Germany

Still problems

Post by Maaspuck »

Hi Miki,

it seems to be quite challenging to solve your problem. As I do not really know what the reason for 'your' error message is, i propose to delete the following lines of the script (lines 1024 - 1026 in version 1.7)

Code: Select all

Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.Run SDB.ApplicationPath & "Scripts\CopyTags\Wait.vbs",1,1
and replace them with

Code: Select all

SDB.MessageBox "Please confirm...",mtInformation,Array(mbOK)
After restarting the script you have to confirm the tagging of every file. This is quite nasty, but this was the first solution for these timing problems I encountered during development. I must admit that I do not know, if this is really a timing problem, but it seems that it is. Maybe this is the reason why there is a problem on your computer and not on my... my Athlon XP 3000+ is quite old.

I hope this code replacement works for you. I will search for a better solution in the future and let you know.

Regards

Maaspuck
Miki
Posts: 141
Joined: Sun Mar 19, 2006 7:01 am
Location: England

Post by Miki »

Think that seemed to fix it.

Before this fix I also tried deselecting some of the info that i didnt want, pretty much everything except play count and rating, and then seemed to smooth it over.

Cheers!
MCSmarties
Posts: 251
Joined: Tue Dec 06, 2005 8:01 pm

Post by MCSmarties »

Maaspuck,

Wow you're really putting some effort into this script. Thank you so much!!
Another round of feedback (sorry I only got around to testing it now) - this is using version 1.7:

Little things I love (besides the obvious additions):
- the script remembers the tags that you specify to copy
- is apparently safe to use - in my tests it has NEVER corrupted the tags of the source file
- doesn't modify the target file name anymore
- warns the user when more sources than targets are selected (it does not however warn if there are more targets than sources)

BUG:
I get exactly the same error as Miki using MP3 files.
The wait.vbs file is present though. I looked at it and noticed that the actual wait function is commented out. I removed the comment, but the error still happens.

Note that it seems to copy the tags for the FIRST SELECTED FILE correctly anyway. All other files are ignored.

I then replaced the code snippet as per your instructions. That's where it gets really interesting!
- the error message is gone (of course there's now the "Please confirm..." window instead)
- the tags appear to be copied correctly to all selected files WHILE THE SCRIPT IS RUNNING
- but after the last file is processed, ALL changes to all target files are discarded!! I'm left with exactly the same tags on the target as before!

Finally, I must say that the "Main window" seems pretty useless to me. The problem is that if you select "copy files" from this menu, you cannot then browse the library to find target files as long as that menu window is still open.
Wouldn't it be better to just add an option to "clear cache" directly in the CopyTags script entry in the Media monkey menu?
Maaspuck
Posts: 156
Joined: Thu Dec 28, 2006 4:41 am
Location: Hamburg, Germany

Bug removed

Post by Maaspuck »

Hi MCSmarties,

thank you very much for your helping and inciting (i hope this is the right word) comments on my script. I am very interested in every little help in order to solve the bugs of this script. I will work on your comments.

By the way, i've probably solved the 'wait.vbs' bug.

Please look for line 1026 and replace it with

Code: Select all

WShell.Run Chr(34) & SDB.ApplicationPath & "Scripts\CopyTags\Wait.vbs" & Chr(34),1,1
A probable reason for the bug were the missing ' " ' (= chr(34)) before and at the end of the path statement. Therefore I added them now. In Miki's case the WShell.Run searches for the

"C:Program files\MediaMonkey\Scripts\CopyTags\wait.vbs"

now instead of

C:Program files\MediaMonkey\Scripts\CopyTags\wait.vbs

I think the space character in the "program files" folder was the problem. I didn't encountered this problem as I am using the german version, where this folder is named "programme" without any space characters.

Hope this helps you too.

BTW: The actual wait function in the wait.vbs is commented out, because it seems that is just enough to call another vbs file. There is no need for a single command in it. I just left the wait function in the file in case of problems so that a user could reactivate it.

Regards

Maaspuck
Maaspuck
Posts: 156
Joined: Thu Dec 28, 2006 4:41 am
Location: Hamburg, Germany

New Update: Version 1.8 (2007-04-12)

Post by Maaspuck »

Hi all,

i've updated the script. Please read the first post in this thread.

@MCSmarties:

i followed your description and tested the script again and again. But unfortunately I am not able to reproduce the bug you descriobed in your post.
But I have to admit, the script was only tested with external files not implemented in my MediaMonkey database. Could this somehow be the problem, that the MediaMonkey rewrites tags with database information after tagging the files by script? During my tests all written tags stayed in my mp3 files.
If you have another idea or can describe the error producing procedure in more detail, please don't hesitate to post. I am really curious about a solution of this bug.

Regards

Maaspuck
Miki
Posts: 141
Joined: Sun Mar 19, 2006 7:01 am
Location: England

Post by Miki »

Still not working :P

It seems to look like it copies them, but then when i click off, and go to find the files again, they arent updated.
Its like the tags are only sticking temporarily.

Thanks for the try though!

Mike.
Maaspuck
Posts: 156
Joined: Thu Dec 28, 2006 4:41 am
Location: Hamburg, Germany

hmmm....

Post by Maaspuck »

Hi Mike,

i am very sorry :( to hear that there are still problems. This is really disappointing and i do not understand the reason.

I tested the script with wma and mp3-files (no database files) on external and internal drives and also with different files in different directories (directory names with and without space characters) including system directories like C:\Windows\System32. All testing was done under Windows XP prof. with admin rights. I tested the script also on my notebook (also WinXP prof., but no SP2) and it worked fine. All tags stayed after the copy process, even after a reboot of the whole system. With restricted user rights i got many many errors. But as you told that the script in general works i think that you are also working as admin and thus different user rights probably can't be the reason for your problems.

As you are not the only user who reports this behaviour this might be another issue concerning localisation or system configuration. But unfortunately i have no idea at the moment. Though i don't think that the system language is a problem, i could and will test on an international/english windows installation (, if i find one ;-)).

Maybe there someone out there who has an idea...?

I apologise for the troubles and if i find a solution, i will let you know.

Regards

Maaspuck
Miki
Posts: 141
Joined: Sun Mar 19, 2006 7:01 am
Location: England

Post by Miki »

I need to reformat my PC anyway, as its running like a bitch.
So after i do, i'll try again.
I bet then itll work :P

Im running Windows XP Home, SP2.

From my memory, previous versions worked fine [or atleast 1.4 did i seem to recall].


Its an improvement though, the ratings are being copied over, but that looks like it.

Could it be to do with blank fields?
On selecting all possible tags to be copied i get this error:
Image

Still none of the tags get copied.

If i deselect BPM then i get this error:
Image
Which i think is to do with album art.
There's no album art on the tags that i want copied from, when i add some then it seems to copy the ratings, and the album art [although its done it twice]. but still not any of the play counts/history.
This last test was done using the My Computer node, rather than the artist node.

After clearing the cache folder only, doing the exact same test, some of the info is copied. The 'date added' for 5 fields were copied, along with the play count for 1 file.
And its now wiped the tags from the source files.
Scrap that, it just looked like that, when i went to look at the files again, after clicking off that node, theyre all there still

The info is still in the cache, so i tried to paste them back to the source files, and only the info for the last 2 tracks were copied, and they are exactly the same format to the others.

I understand that this information probably isn't useful at all :P
But it might give you an insight.

I'll give you another update after i reformat.

Thanks for the effort you're putting into the script though!

Mike.
MCSmarties
Posts: 251
Joined: Tue Dec 06, 2005 8:01 pm

Post by MCSmarties »

Hey Maaspuck,

Just tested your newest version 1.8 and I'm not sure what to think.

At first it looked like it didn't work at all, and in fact after running it the SOURCE files I used for testing were slightly corrupted. More precisely, the album art was replaced by a "blank" album art (but it was still present) and the script would crash when I tried again, saying that something was wrong with the album art (sorry, I didn't write the message down).

I then fixed the source tags manually (eg removed the corrupt album art and added the real art again) and then the script worked *almost* perfectly. Tested it with several completely different files. Now I'm wondering if the tags of the files I first used were bad to begin with, but I doubt VERY much that it was the case. Still, I don't know for sure.


BUG:
****
The only bad thing is that during the tagging of EACH file, a notepad window opens showing the content of wait.vbs. It has to be closed manually to finish copying the tag, then appears again with the next file!
****

Concerning your suggestion to use external files rather than files that are implemented in the database, I tried both - files that were part of my collection and others that were not (all MP3) . It makes no difference whatsoever.

Hope this helps!

Cheers, Martin
Post Reply