Thanks for visiting my blog - I have now moved to a new location at Nature Networks. Url: http://blogs.nature.com/fejes - Please come visit my blog there.

Thursday, July 19, 2007

Installing trac on Ubuntu

I have a relatively geeky post today. I've been playing with trac, for the past few days, trying to get it installed. I just thought I'd post a few of the errors that I had, and the solutions.
Failed to create environment. 'ascii' codec can't encode character u'\xa8' in position 6: ordinal not in range(128)

My personal favorite. I had created a password with a ! and a % in it. Apparently, that's a no-no. Mysql didn't like it, and I had to change the password in mysql to fix it. After logging into mysql, I used the usual:
UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='username';

Naturally, that was only partially successful. After changing a password in mysql, you still need to flush the settings, and have them reloaded. This can be accomplished with:
FLUSH PRIVILEGES;

If you don't, calling "sudo trac-admin /usr/trac/projectname/ initenv" will give you an error that looks like:
OperationalError: (1045, "Access denied for user 'username'@'localhost' (using password: YES)")

That's just mysql's way of telling you that it's still using the old password, and that you may have changed the table, but the software is running with the old parameters.
Moving along, I should also mention that, if you've tried this before, and trac gives you the error:
Initenv for '/usr/trac/projectname' failed.
Does an environment already exist?

there is an easy solution. Go into the directory /usr/trac/projectname, and delete everything in there (sudo rm -rf *), with, of course, the usual caveat that you should make sure you're in the right directory when you execute that! (Doing that in the wrong place will naturally delete your entire hard drive. You've been warned.)
Good luck with the rest of your install.

Labels:

0 Comments:

Post a Comment

<< Home