Hello,
I'm need hep figuring out how to set up a local GAE development server with
MySQL.
MySQL connection parameters are specified via App Launcher application
settings: --mysql_user=root --mysql_password=xxxxxx --mysql_host=localhost
--mysql_port=3306
When I launch my web2py app with GAE Launcher on my local Windows box I get
this erorr message:
############
ERROR 2012-08-04 06:28:43,515 dal.py:5962] DEBUG: connect attempt 0,
connection error:
Traceback (most recent call last):
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\dal.py", line 5955,
in __init__
self._adapter = ADAPTERS[self._dbname](*args)
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\dal.py", line 3310,
in __init__
self.folder = folder or
'$HOME/'+thread.folder.split('/applications/',1)[1]
IndexError: list index out of range
#############
What does the following line do?
self.folder = folder or '$HOME/'+thread.folder.split('/applications/',1)[1]
If I comment out "or '$HOME/'+thread.folder.split('/applications/',1)[1]"
in DAL.py and relaunch the dev server, the application appears to be able
to connect to MySQL but then I get a different error message:
########
INFO 2012-08-04 06:42:35,142 rdbms_mysqldb.py:102] Connecting to MySQL
with kwargs {'passwd': 'xxxxxx', 'unix_socket': '', 'host': 'localhost',
'port': 3306, 'user': 'root'}
ERROR 2012-08-04 06:42:35,153 warnings.py:29] C:\Users\alexei\Dev\web2py\
vocabilis.net\gluon\dal.py:1386: Warning: Can't create database
'vocabilis'; database exists
ret = self.cursor.execute(*a, **b)
ERROR 2012-08-04 06:42:35,575 restricted.py:155] Traceback (most recent
call last):
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\main.py", line 510,
in wsgibase
session._try_store_in_db(request, response)
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\globals.py", line
561, in _try_store_in_db
record_id = table.insert(**dd)
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\dal.py", line 6829,
in insert
return self._db._adapter.insert(self,self._listify(fields))
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\dal.py", line 928,
in insert
raise e
ProgrammingError: (1146, "Table 'vocabilis.web2py_session_vocabilis'
doesn't exist")
#########
The vocabilis database does exist. It was created earlier when I connected
to MySQL from a non GAE environment.
If I specify a different non-existent database in the connection string,
then after relaunching the application vith the GAE Launcher I get this
error message:
#######
INFO 2012-08-04 06:44:45,415 rdbms_mysqldb.py:102] Connecting to MySQL
with kwargs {'passwd': 'xxxxxx', 'unix_socket': '', 'host': 'localhost',
'port': 3306, 'user': 'root'}
ERROR 2012-08-04 06:44:45,828 restricted.py:155] Traceback (most recent
call last):
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\main.py", line 510,
in wsgibase
session._try_store_in_db(request, response)
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\globals.py", line
561, in _try_store_in_db
record_id = table.insert(**dd)
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\dal.py", line 6829,
in insert
return self._db._adapter.insert(self,self._listify(fields))
File "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\dal.py", line 928,
in insert
raise e
ProgrammingError: (1146, "Table 'vocabilis3.web2py_session_vocabilis'
doesn't exist")
#######
So the application appears to be unable to create the session table.
I'm running Windows, Python 2.7, web2py 1.99.7, MySQL 5.5
--
Alexei Vinidiktov
--