Hi,

I am trying to create a test for one of my modules.
This module depends on several global variables like "Resonse" and some 
extra things i store in current from one of my Models. (current.myapp.*** ).
So to be able to run the test i need to execute some of the models like 
this. (Is this the correct way?)
(The testbed stuff is for GAE to create stubs for GAE services)
def setUp (self):
        self.testbed = testbed.Testbed()
        self.testbed.activate()
        self.testbed.init_datastore_v3_stub()
        self.testbed.init_memcache_stub()
        exec_environment('applications/init/models/0.py')
        exec_environment('applications/init/models/db.py')

I am using GAE with web2py 2.6.4 source and Python 2.7.3

Now when i run the test i get this error:

No handlers could be found for logger "web2py"
DEBUG: connect attempt 0, connection error:
Traceback (most recent call last):
  File "C:\Users\Quint\Documents\Projects\GAE\*******\gluon\dal.py", l
ine 7854, in __init__
    self._adapter = ADAPTERS[self._dbname](**kwargs)
  File "C:\Users\Quint\Documents\Projects\GAE\*******\gluon\dal.py", l
ine 2288, in __init__
    if do_connect: self.find_driver(adapter_args)
  File "C:\Users\Quint\Documents\Projects\GAE\*******\gluon\dal.py", l
ine 791, in find_driver
    raise RuntimeError("no driver available %s" % str(self.drivers))
RuntimeError: no driver available ('sqlite2', 'sqlite3')

So it looks like DAL is instantiated and by default it tries to connect to 
sqlite?

What can i do about this?

BTW when i try to start the web2py shell i get a similar error only now i 
says that it find a "google" driver:

No handlers could be found for logger "web2py"
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
Database drivers available: google
DEBUG: connect attempt 0, connection error:
Traceback (most recent call last):
  File "X:\GAE\*******\gluon\dal.py", line 7854, in __init__
    self._adapter = ADAPTERS[self._dbname](**kwargs)
  File "X:\GAE\*******\gluon\dal.py", line 2288, in __init__
    if do_connect: self.find_driver(adapter_args)
  File "X:\GAE\*******\gluon\dal.py", line 791, in find_driver
    raise RuntimeError("no driver available %s" % str(self.drivers))
RuntimeError: no driver available ('sqlite2', 'sqlite3')

Thanks!


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to