GNUMP3d problem: “uninitialized value in concatenation” fixed
If you’ve attempted to install GNUMP3d on a Windows XP machine, there’s a good chance you’ve made it to step 4 and received the following error message when running C:\gnump3d2\gnump3d-index.bat:
Use of uninitialized value in concatenation (.) or string at c:\gnump3d2\lib/gnump3d/config.pm line 140.
Use of uninitialized value in concatenation (.) or string at c:\gnump3d2\lib/gnump3d/config.pm line 140.
Can’t read configuration in : No such file or directory
If you were brave enough to move on to the second step 4, you’d find there’s not actually a file even located at C:\gnump3d2\bin\run.bat. Turns out, you can still run the program by running C:\gnump3d2\bin\gnump3d.bat but many of the statistics don’t work and will kick out the same error message above.
I was unable to find any fixes on teh intarweb, so I set about creating my own. I’m no professional programmer, but here’s what I did (and it worked):
- banged head on wall while attempting to use SysInternal’s FileMon to see exactly what was going on…
- …and failed
Finally I relaxed a little and used Perl’s debug and trace features to see what was happening. Because the steps posted at http://www.gnu.org/software/gnump3d/README.Windows are so erroneous, I’ve posted the new steps below (steps 1-3 were taken verbatim from the GNUMP3d website, with the exception of my note in #3). Remember, this information is accurate as of 03-05-2007 and only pertains to version 2.9.9.1 (and possibly earlier versions as well, but I don’t want to check the changelog or test this fix on previous versions).
- Download and install a recent version of Perl from ActiveState.
- Unzip the gnump3d-2.x.zip file; and move the extracted directory to C:\gnump3d2 - preserving any existing configuration file you might have.
- Make any changes to c:\gnump3d2\etc\gnump3d.conf.win (make sure to change "root" if your music is not located at C:\mp3).
- In C:\gnump3d2\bin\gnump3d-index, put this at line 162 after the end of the first IF statement
- In \gnump3d2\lib\gnump3d\filetypes.pm, change line 72 from
- Create a folder to hold the logs at c:\gnump3d2\logs\ (normally this is created by gnump3d-index.bat in the next step, but for some reason the Win XP version doesn’t)
- Run C:\gnump3d2\gnump3d-index.bat one time
- Edit C:\gnump3d2\gnump3d.bat to reflect your music’s root location (the default is C:\mp3). This value should match the value used in Step 3.
- Run C:\gnump3d2\gnump3d.bat to start the program
- Enjoy your tunes from anywhere
else
{
$CONFIG{’file’} = "C:/gnump3d2/etc/gnump3d.conf.win";
}
if ( -e "C:/gnump3d2/file.types" );
to
if ( -e "C:/gnump3d2/etc/file.types" );
March 6th, 2007 at 6:31 AM
Your fix is good.
But I got other problems. The easy one was that when i run gnump3d.bat it’s not creating /logs/ dir and i created it manually.
The other was that even i’ve changed the root directory of my mp3s in gnump3d.conf.win it reads C:\mp3 (default). That’s what it says when i run gnump3d.bat again. I found that in gnump3d.bat there is a declaration about root directory. I changed it and now it’s running, i think
March 6th, 2007 at 8:37 AM
EMZ,
I apologize for leaving out the other problems you mentioned! In all of the work to track down the main issues, I forgot to write about those as well. I’ll edit the post to include the issues you brought up.
Thanks!
May 21st, 2007 at 4:36 PM
Thanks very much, sorted my problem out easily
much appreciated
June 23rd, 2007 at 5:13 PM
Wonderful. These changes work nicely with the current GNUMP3d package as of today. Were these changes posted back so that the author can update his documentation and code? After all your hard work, you should be in the position to take credit for it.
Thanks again!
August 29th, 2007 at 3:36 PM
Many thanks.
October 25th, 2007 at 4:05 AM
Thanks for your attempt but it looks like with the newer versions of all software mentioned this isn’t working anymore. I am not sure if it the newer perl or the 3.0 rls of gnump3d but for the life of me I could not get this working. I kept getting invalid characters perl errors after copy and pasting your edits.
October 25th, 2007 at 4:18 AM
I just tried one more time and dl’ing the same version you used I still get the same error
“Unrecognized character \x92 at c:\gnump3d2\bin\gnump3d-index line 164.”
October 30th, 2007 at 10:41 AM
Ian try just typing out the required information in the gnump3d-index file. I also had issues trying to cut and paste it.
October 30th, 2007 at 5:11 PM
Great it works, thanks.
Note, I also get the
“Unrecognized character \x92 at c:\gnump3d2\bin\gnump3d-index line 164.” error, this is a copy/paste problem of the ‘ characters in $CONFIG{’file’}, what you can do is replacing the ‘ characters by another in the already existing code (for example in $CONFIG{’file’} = “gnump3d.conf”; that is line 160 of the file).
I hope it will help you.
Gluttony.
February 16th, 2008 at 1:09 PM
The invalid character error is caused by him using ` instead of ‘ in his code…
Where he says to use:
else
{
$CONFIG{’file’} = “C:/gnump3d2/etc/gnump3d.conf.win”;
}
Instead, use:
else
{
$CONFIG{’file’} = “C:/gnump3d2/etc/gnump3d.conf.win”;
}
Cheerio -
February 25th, 2008 at 12:19 AM
i got it running under xp home sp2 just fine with my ipod. tahts about 3000 sounds, ubuntu couldnt do it. although maybe i didn’t try hard enof, but thats not the point. i used ur directions, well bits and peices, but got it running. email me and i can explain what i did.
March 31st, 2008 at 4:40 PM
Thanks a lot for your contribution. I wasn’t able to make it work until I fond your blog post. Great job!
Now the problem that I have is that when I try to access my music online it chops every 3 seconds. Basically you can’t listen to the music. It’s weird because no one has reported that problem as far as I know.
Do you have any ideas or suggestions?
Any help is greatly appreciated.
Thanks again for your valuable contribution.
March 31st, 2008 at 11:53 PM
Rodrigo,
By “chop,” do you mean that it will pause every three seconds and then pick up where it left off? If so, there’s a good chance that the “upload” speed of your cable/DSL/etc line isn’t high enough to keep up with the needs of GNUMP3d. Your best bet is to downsample; see the DOWNSAMPLING file in the GNUMP3d directory.