Cannot start web2py - Runtime error: Unable to import driver

445 views
Skip to first unread message

Goronmon

unread,
Apr 23, 2012, 11:10:55 PM4/23/12
to web...@googlegroups.com
I'm trying to use web2py on a Ubuntu install. I can start it up from the console, but as soon as I navigate to it in the browser I the internal error about not being able to import the driver.

I haven't touched anything or done any type of special configuration. I've gotten it to work in WIndows just fine, but for some reason I just can't get it working on Ubuntu. I've spent all evening trying to get around the issue but have had no luck so far.

I would really appreciate any help anyone can give me in getting around this error.

Ross Peoples

unread,
Apr 24, 2012, 7:47:33 AM4/24/12
to web...@googlegroups.com
Can you paste the traceback of the ticket? 

Johann Spies

unread,
Apr 24, 2012, 7:52:36 AM4/24/12
to web...@googlegroups.com
If you want us to help you, please provide more information.  Did you click on the url provided by the 'Internal error' mesage?  If so what did the ticket tell you?

There is a script that comes with Ubuntu which can install web2py with all the necessary ubuntu packages and configure it to work with Apache.  Did you try that?

Regards
Johann.
--
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

Bruce Wade

unread,
Apr 24, 2012, 9:15:11 AM4/24/12
to web...@googlegroups.com
There is a bug with version 1.99.7 especially if you want to use postgresql. If you don't have psycopg2 installed then it will give the an error about get can't find .... you need to change the connection string if you want to use the built in driver that comes with this version of web2py, I have posted about this a while back.

If your error is this: AttributeError: 'list' object has no attribute 'get'

Then this is the problem: 
Line 1999 in trunk:
                 self.driver = drivers.get('pg8000')
Should be:
                 self.driver = self.drivers.get('pg8000')

Massimo Di Pierro

unread,
Apr 24, 2012, 9:31:30 AM4/24/12
to web...@googlegroups.com
This problem was fixed in trunk some time ago.

Goronmon

unread,
Apr 24, 2012, 11:09:35 AM4/24/12
to web...@googlegroups.com
I'm at work atm, so I can't provide specifics from my environment. It is extremely similar to the following


Now that I've had some time to sleep on the issue, the only thing I can think of is that SQLite didn't show up in "Database drivers available" even though I'm certain I have it installed, as I've played around with the command line a bit.

Could it be that the 1.99.7 source using SQLite as a default and failing if it's not detecting it setup correctly?

I'll try pulling down the trunk when I get home later and see if that fixes anything as well.

Goronmon

unread,
Apr 24, 2012, 8:52:42 PM4/24/12
to web...@googlegroups.com
I figured it out. I forgot that I had built python from source and I had to install libsqlite3-dev so that I could then rebuild python to get sqlite to install correctly. That ended up taking care of the issue.
Reply all
Reply to author
Forward
0 new messages