First time here? Check out the FAQ!

allanw's profile - activity

2014-03-11 04:50:40 -0500 received badge Notable Question (source)
2013-07-04 04:32:46 -0500 received badge Notable Question (source)
2012-08-27 09:25:15 -0500 received badge Popular Question (source)
2012-08-03 05:31:53 -0500 received badge Famous Question (source)
2012-08-03 05:31:53 -0500 received badge Popular Question (source)
2012-06-29 07:28:39 -0500 received badge Famous Question (source)
2011-02-12 08:09:30 -0500 received badge Scholar ( source )
2011-02-12 08:09:30 -0500 marked best answer Database error when running migrations

In my pg_hba.conf I have, approximately

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   askbot      askbot                            md5
local   test_askbot askbot                            md5

These entries must be before "all" - there might be something like:

local   all         all                               ident

Put your lines above that one.

After the file is changed, restart the database daemon process. On my system I do

/etc/init.d/postgresql restart

But also you'll need to create a user, databases and assign owner to the databases.

To do that, you need to log in as user postgres - you could also su to that user through root and then open the database:

su #enter root password
su postgres
psql #user postgres can login without password

Then in the database run:

create role askbot with login encrypted password 'thepassword';
create database askbot with owner=askbot;

If you want to run tests as well, you will need to add privilege to create database, and create database for running the testcases:

alter role askbot with createdb;
create database test_askbot with owner=askbot;

or add the privilege in the first create role statement.

2011-02-11 18:42:12 -0500 asked a question Database error when running migrations

I've set up a Postgres database (createdb askbot; create user askbot with password 'blah; grant all on database askbot to askbot). For some reason, when I tried to do syncdb, I got an error saying 'psycopg2.OperationalError: FATAL: Ident authentication failed for user "askbot"'. Anyway, I ended up adding a line to the pg_hba.conf file to fix password authentication for the askbot user.

The problem I'm having is that when I try and run python manage.py migrate, I get this error:

File "/srv/askbot/askbot/management/commands/init_postgresql_full_text_search.py", line 19, in handle_noargs cursor.execute("CREATE LANGUAGE plpgsql") psycopg2.ProgrammingError: must be owner of database askbot

Any help with this would be much appreciated.

2011-02-11 12:59:40 -0500 received badge Self-Learner ( source )
2011-02-11 12:59:40 -0500 received badge Teacher ( source )
2011-02-11 11:43:42 -0500 answered a question Error: 'No module named keyedcache'

Okay, this problem is now solved. I simply added the required site-packages directory to my PYTHONPATH.

2011-02-11 07:35:59 -0500 answered a question Error: 'No module named keyedcache'

Yes, I ran python setup.py develop. I'm starting to think that it might be a path issue, because if I add a logging statement to the django.wsgi file and output the contents of sys.path, I can see that it contains paths such as /usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/. The paths should be referring to the /lib/python.2.5/site-packages/ directory inside the virtualenv, shouldn't they?

2011-02-10 20:23:24 -0500 received badge Student (source)
2011-02-10 20:20:56 -0500 asked a question Error: 'No module named keyedcache'

I'm in the process of setting up Askbot under Apache/mod_wsgi.

I cloned the Askbot repo into my virtualenv, then ran the startforum command and specified a project name. I can run the following command: bin/python <project_name>/manage.py shell and then do 'import keyedcache' and it works fine.

However, when I try and access the site, I'm seeing the following error in the logs:

ImproperlyConfigured: Error importing middleware askbot.middleware.anon_user: "No module named keyedcache"

Anyone got any suggestions?