Page 14 of 16

Error MegaDJ v2.54 [MM4]

Posted: Fri Nov 25, 2011 4:18 am
by Santadog
Just tried to install MegaDj 2.5 (MM4 on XP) for the first time.
Same error as mentioned by others:

Path not found
File: "C:\Documents and Settings\...\Application Data\MediaMonkey\Scripts\Auto\MegaDJ.vbs", Line 955, Column: 1
"Error happend during script execution. Can'find path".

The path DOES exist.

By closing down MM4:
Cannot create file: "C:\Program Files\MediaMonkey\Scripts\Auto\MegaDJ\megadj.ini"

(BTW: MM4 doesnt really close'after this error: it's still there in the Taskmanager).

So I created the folder C:\Program Files\MediaMonkey\Scripts\Auto\MegaDJ

Now, when editing a MegaDJ node I get the error:
Error #-2147024894-
File "C:\Documents and Settings\...\Application Data\MediaMonkey\Scripts\Auto\MegaDJ.vbs", Line 1580, Column: 2

Any ideas?

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Fri Nov 25, 2011 1:05 pm
by AnthonyM1229
twinbee wrote:Hi r0k, did you get it to work in the end? If so, feel free to post the solution here to benefit others.

AnthonyM1229, I'll at least bear the scheduled playback feature in mind, although it would be a lot of work.

Mars74, I'll try out MM4 hopefully soon, and see if I can replicate the problem. I'm still using MM3 (only just found out about MM4 today).
Hey, thanks for the reply! Yeah, I figured it might be a lot of work... I've actually gotten something figured out on my own, though! In the last few weeks, I've made some modifications to the script, that makes MegaDJ switch nodes on my configured schedule. It does pretty much everything I want, and almost perfectly :) Not bad, given that I went into this with little experience in VBScript and even less experience in MediaMonkey scripting! All my changes are hard-coded, though, and probably useful only to me, as is... still, if you want me to explain more how I did it and/or send you the modified script, I'd be glad to!

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Fri Nov 25, 2011 1:21 pm
by twinbee
Well there's another upvote for open source if I ever saw one. Glad to hear you got something working Anthony.

Santadog, thanks for the extra info, I'll try to look into it this week.

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Fri Nov 25, 2011 1:58 pm
by AnthonyM1229
I'm glad too! :)

Hey, I did a little experiment to see if I could help troubleshoot Santadog's issue. I installed MediaMonkey 4 and MegaDJ in XP Mode (virtual Windows XP inside Windows 7), and sure enough, I got his same errors. Upon investigation, I traced the apparent trouble lines to 158, where strMMpath is first established. As the experiment, I hard-coded the full path to my "Scripts\Auto\" folder, then reloaded MediaMonkey, and was able to create a MegaDJ node with no error. Hmm... I don't know if that helps. I never had this problem in my Windows 7 setup, and that's where I would expect it, since I know the Program Files folder are less accessible by default. I actually run my main MediaMonkey setup on a portable install on a different partition.

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Fri Nov 25, 2011 5:56 pm
by Santadog
@ AnthonyM1229
Thanks for trying! So it's not just me..... (sorry)
You've made some modifications to the script, that makes MegaDJ switch nodes on a schedule?
Looks like a great feature to me.

@Twinbee: Thanks!

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Fri Nov 25, 2011 10:00 pm
by AnthonyM1229
Santadog, until you get an official word from twinbee on what's going on, you can try what I did to get MegaDJ working under XP. Open megadj.vbs in Notepad or another text editor. You may have to search your hard drive for the exact location, but the path should be something like "C:\Documents and Settings\*username*\Local Settings\Application Data\MediaMonkey\Scripts\Auto". In megadj.vbs, scroll to line 158, which should read:

Code: Select all

Dim strMMPath : strMMPath = SDB.ApplicationPath & "Scripts\Auto\"
You could also just search for that code, if the line numbering is off for some reason, or you don't see any numbers (as is the case with Notepad). Now, edit the line so it looks something like this:

Code: Select all

Dim strMMPath : strMMPath = "C:\Documents and Settings\*username*\Local Settings\Application Data\MediaMonkey\Scripts\Auto\"
If I recall correctly, the code as it was to begin with, would generate a path where mediamonkey.exe is (Program Files, by default). User scripts and data are found by default in Application Data, however. I don't know if this was true too in MM3, which MegaDJ was coded for, but anyhow, editing the above line should make the script work for you with no errors. It did for me. Now, I just did light testing, such as creating a new node. I don't know if any problems would arise with regular use. It shouldn't. Now, if MegaDJ still doesn't work correctly for you even after making my suggested change, it could be because I messed up the path :( I don't have my test XP install to refer to now, since I reverted my virtual XP to a saved state of before the MediaMonkey install, after I finished testing.

In place of making the above changes, you may also try re-installing MM as a portable installation. (There's a checkbox you have to mark for that during the install process.) Installing it as portable would make all your data and scripts be together with the program files, instead of the data and scripts being separated into the Application Data. On Windows 7, I run MM4 as a portable install, and MegaDJ worked correctly for me from the beginning.

Now, as for my modifications that let me listen on a schedule...I'm afraid that as is, my changes only serve my config. I modified several parts of the script, and hard-coded my scheduling routines, which involve the use of MM timers and lots of VBScript conditional statements and date/time functions, and probably other esoteric coding stuff, haha. It's not very pretty :lol: There is no options screen or other UI for it for easy customization, because I don't know how to code that stuff yet. So, all that to say, I'm not sure I can help you with this :(

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sat Nov 26, 2011 4:59 am
by Santadog
Thanks AnthonyM1229 !

First it didn't work, then I noticed the path should be without:

"\local Settings"

I only did some light testing, but so far so good. So I didn't try the portable installation anymore.

As for your modifications: I fully understand this is your own script, is modified just for your configuration and is not for public use (in english: not 'monkey proof' ??). It's not something you can just copy for everyone.
No problem! MegaDJ works, so I'm happy now :D

Thanks again for your help and very quick reply !!

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sat Nov 26, 2011 11:56 am
by AnthonyM1229
You're welcome! I'm glad I could help, and I'm glad you were able to figure out the right path even when I messed it up. That's one thing I always disliked about XP, that there's more than one "Application Data" folder--it would be so confusing sometimes! Of course, Vista and Windows 7 aren't that much better in this regard--there's one AppData folder in those, but with three different subfolders, and programs will occasionally store settings in more than one subfolder...crazy stuff, haha. That's why the programs I use most often and/or customize most often, I try to install portably when possible, so I always know where to look on my hard drive for files to edit.

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sat Nov 26, 2011 12:18 pm
by twinbee
I might've guessed this would have something to do with the 'overprotection' of the Program files folder.

I too really dislike the way certain programs store files which are scattered over a million different locations (and how Windows seems to encourage that). Instead I like to keep everything together as much as possible. For my latest project, OpalCalc, I had the problem of saving to the Program files folder, and couldn't (at least without turning off UAC). The 'solution' I found in the end was to supply a portable version along with the 'standard' version.

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sat Nov 26, 2011 2:08 pm
by AnthonyM1229
OpalCalc...I had a feeling I'd heard of that before, and sure enough, upon viewing the link for it, I saw the Lifehacker reference. That's where I first read about it! That's very cool that you got your work featured on there. I remember even downloading it and playing with it for a bit...I may even still have it somewhere on my computer, haha. I still use the built-in Windows calculator (or even Google) for most of my quick calculations, but I know if I need to do something more complex, I can turn to your program :)

Also, sometime before, when I was exploring your articles on skytopia.com, I came across the review article I first read a few years back, comparing MediaMonkey to other media players. It really made me interested in trying out MediaMonkey, and I did, in hopes of being able to use the one plugin that was keeping me tied to Winamp, this long-obsolete and now extinct (can't even find it online anymore) plugin called RoboDJ. Although never fully integrated into Winamp 5.X (no media library support, and therefore required its own database, that grew into a huge challenge to keep updated as my music collection grew exponentially :lol:), it was a great plugin, because it provided weighted random shuffling to Winamp. The plugin was buggy and prone to crashes, though--and many a time, it'd screw up my weighted ratings (until I began using MS Access to manage the ratings database externally). Plus, Winamp had its own annoying quirks that made me want to "jump ship" to another player if I could. But oh, what to do about my weighted ratings?

My first trial of MediaMonkey back in late 2009 didn't work out for me. I was sold on MM being able to use Winamp plugins, but RoboDJ was one that wouldn't work correctly for me. So, I reverted to Winamp, sadly...and I stayed with it until October this year. Growing discontent with Winamp inspired me to take another look into MM. MM's SQLite database format really appealed to me this time, I mean, since I've already been using MS Access to store a copy of my Winamp data and relating it to my RoboDJ data to make changes/additions to the RoboDJ data. I figured I could transfer all my desired data to MM's database, which I managed to (it was an adventure in itself, haha). However, the issue of what to do about listening to music with weighted ratings, loomed once again.

I found some RadioDJ or something like that plugin for MM, that I thought would serve me well... In the process of importing my data from Winamp, I realized I only use like 10 or 11 major ratings classes, which corresponded perfectly to the star ratings system (and its internal number values). So, I converted my ratings data accordingly, and then with RadioDJ, I was able to figure out appropriate weightings for each rating. However, the plugin quickly proved limiting, in ways I don't even remember anymore, haha.

So, I resumed my search for a worthwhile plugin, and found MegaDJ...it sure seemed promising, after reading through the entire thread's posts. Highly configurable with advanced queries and weighting criteria? "Yes!" I exclaimed. This has turned out to be infinitely better than RoboDJ. Thanks to MegaDJ, I now have
  • Always fresh playlists! In my main nodes, my queries begin with only songs with no playcount and no rating, or songs above a certain rating. This way, songs I hear once and don't particularly care for, will never be queued again. Back with RoboDJ, I'd have to manually rate such songs down or wait till I ran queries in Access and exported an updated database, to remove those disposable tracks from rotation.
  • Easily customizable weightings! Back with RoboDJ, I'd have to adjust queries and/or do global find/replace operations in order to change my songs' weightings, and it was never a dynamic process, of course. In MegaDJ, though, I just have to change a few numbers, click Refresh, and my list gets instantly updated! Of course, I can't forget that I can make weightings by almost anything, such as by playcount, last time played, date added, genre--all of which was either never possible with RoboDJ or very clunky to implement using Access.
  • Scheduling! Thanks to my modifications, I now have my MegaDJ nodes working on a schedule :D I have some that I schedule daily, and a few weekly ones, and even a monthly "1990s weekend marathon", haha. And just this week, I figured out how to schedule my Christmas-themed nodes from Thanksgiving Day till the day after Christmas! This is awesome--it's like I have my own "radio station" at home :D
  • Other mods In addition to scheduling, I made my nodes' track lists persistent, so that they don't get erased by editing a node unless I specifically click Refresh. Also, I've implemented something like bookmarking--when I'm playing in one node (say I'm on track 20 of 40), and my scheduling switches to another node, the now playing list gets deleted and then repopulated with the new node's tracks once the current song finishes. But then, once the schedule returns to the previously playing node, that node will begin on track 21 instead of track 1. Pretty cool, huh?
Twinbee, thank you so much for your program. I rarely take time to write feedback on things (positive or negative), but I really felt a need to express my praise for this program. You make MediaMonkey awesome, and managing my music simpler, and very enjoyable once again. Thank you!

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sat Nov 26, 2011 4:26 pm
by Mars74
Thanks God (and AnthonyM1229 & Santadog & Twinbee for sure) : IT'S WORKING :D :D :D

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sat Nov 26, 2011 4:32 pm
by AnthonyM1229
Mars74 wrote:Thanks God (and AnthonyM1229 & Santadog & Twinbee for sure) : IT'S WORKING :D :D :D
Great to hear! :) How did you finally get it working?

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sat Nov 26, 2011 6:10 pm
by Mars74
Put this line :
Dim strMMPath : strMMPath = "C:\Documents and Settings\*username*\Application Data\MediaMonkey\Scripts\Auto\" :D ...
I can start play a little bit witrh all settings.
Thanks again to all contributors. :wink:

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sun Nov 27, 2011 5:24 am
by twinbee
Thanks again Anthony for the awesome feedback on MegaDJ and for pointing me in the right direction with this bug. I am now investigating a standard way of accessing the most appropriate path (as XP through to Win7 differ, and like you say, there are fragmented options even within a given OS).
OpalCalc...I had a feeling I'd heard of that before, and sure enough, upon viewing the link for it, I saw the Lifehacker reference. That's where I first read about it! That's very cool that you got your work featured on there.
Thanks! Yeah, OpalCalc took a lot of sweat out of me, but it had to be done :) Pretty chuffed seeing it on Lifehacker, and it's got quite a lot better since then!
Also, sometime before, when I was exploring your articles on skytopia.com, I came across the review article I first read a few years back, comparing MediaMonkey to other media players.
Haha, next you'll be telling me you've heard of the 'Mandelbulb'! (my other major project over these past few years).

Glad MegaDJ is now working for you Mars74 and Santadog too! :D

Re: MegaDJ v2.54 [MM3] - (2011-01-03) (escape char added)

Posted: Sun Nov 27, 2011 11:48 am
by AnthonyM1229
You're welcome, twinbee! I'm glad I could help :) In fact, I may have some more help for you! I did some more testing in my virtual XP install, and came up with a standardized way to write megadj.ini and the created node files! At least in XP, though.

To the original troublesome line,

Code: Select all

Dim strMMPath : strMMPath = SDB.ApplicationPath & "Scripts\Auto\"
I made the following additions and changes:

Code: Select all

'full path to MM.DB in %appdata%
TestPathFull = SDB.Database.Path

'Makes an array from this path
TestPathSplit = Split(TestPathFull,"\")

'Takes off the MM.DB filename, leaving the %appdata% path to MediaMonkey folder as an array
TestPathFiltered = Filter(TestPathSplit,"MM.DB",False)

' Creates a string from the array
TestPath = Join(TestPathFiltered,"\")

'strMMPath now uses the new path as a base
Dim strMMPath : strMMPath = TestPath & "\Scripts\Auto\"
I realized that since the MM4 database is stored in %appdata% along with MegaDJ (not sure if this is true in MM3 too?), I figured I could use that to my advantage since there's a standard way of getting that path via "SDB.Database.Path". This works for me--I was able to create a new MegaDJ node with no errors afterward. I'm not sure if this can be "the standard way" for everyone, especially on Vista/7 (I don't want to risk jeopardizing my main MM install on Windows 7 trying to test this since I run MM portably, anyway), but maybe this helps in your investigation of the most appropriate path? Let me know! :D