Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Alexei Vinidiktov
Trunk appears to work on Windows now.

I think there's a redundant line in there (line 3867):

self.folder = folder  # line 3867
self.db_codec = db_codec
self.folder = folder or '$HOME'+os.sep+thread.folder.split(
   os.sep+'applications'+os.sep,1)[1]

On Tue, Aug 14, 2012 at 1:30 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Ok. this is in trunk. Still need testing, there may be other issues. The
> $HOME in that line assumes this is running on GAE (or linux) and not on
> Windows.
>
>
> On Monday, 13 August 2012 13:10:03 UTC-5, Jonathan Lundell wrote:
>
>> Change '/applications/' to os.sep + 'applications' + os.sep
>>
>> On Aug 13, 2012, at 10:40 AM, Alexei Vinidiktov 
>> wrote:
>>
>> The contents of thread.folder: C:\Users\alexei\Dev\web2py\web**
>> 2py.googlecode.com \**
>> applications\vocabilis\**databases
>>
>> On Mon, Aug 13, 2012 at 11:11 PM, Massimo Di Pierro <
>> massimo@gmail.com> wrote:
>>
>>> any way you can log what is in thread.folder?
>>>
>>>
>>> On Monday, 13 August 2012 10:38:48 UTC-5, Alexei Vinidiktov wrote:
>>>
 It gives me the error:

 self.folder = thread.folder.split('/**applicat**ions/',1)[1]

 IndexError: list index out of range

 Full traceback:

 ERROR2012-08-13 15:36:00,799 dal.py:6586] DEBUG: connect attempt 0,
 connection error:
 Traceback (most recent call last):
   File 
 "C:\Users\alexei\Dev\web2py\web2py.googlecode.com
 \gluon\dal.py", line 6573, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File 
 "C:\Users\alexei\Dev\web2py\web2py.googlecode.com
 \gluon\dal.py", line 3845, in __init__
  self.folder = thread.folder.split('/**applicat**ions/',1)[1]
 IndexError: list index out of range


 On Mon, Aug 13, 2012 at 11:06 AM, Massimo Di Pierro <
 massimo@gmail.com> wrote:

> Can you try replace
>
> self.folder = folder or '$HOME/'+thread.folder.split('**
> /applications/',1)[1]
>
> with
>
> self.folder = thread.folder.split('**/**applicat**ions/',1)[1]
>
>
>
>
>
> On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:
>
>> Ok. I've managed to connect to MySQL from GAE local dev server on
>> Windows if I change line 3845 in dal.py to this:
>>
>> self.folder = ""
>>
>> instead of (self.folder = folder or '$HOME/'+thread.folder.split('***
>> ***/applications/',1)[1])
>>
>> I don't know if it breaks anything though.
>>
>> On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov <
>> alexei.v...@gmail.com> wrote:
>>
>>> The problem is still not resolved in trunk.
>>>
>>>
>>> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov <
>>> alexei.v...@gmail.com> wrote:
>>>
 Here it is: db = DAL('google:sql://**vocabilispro
 ject:vocabilis/**vocabilis')

 I pass the password and the user name via App Launcher parameters
 as suggested in the GAE SDK docs: --mysql_user=root 
 --mysql_password=xx
 --mysql_host=localhost --mysql_port=3306


 On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
 massimo@gmail.com> wrote:

>  Can you show your complete connection string (masking any
> password of course)?
>
>
> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>
>>
>>
>> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
>> alexei.v...@gmail.com> wrote:
>>
>>> 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=xx
>>> --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:
>>>
>>> 
>>> ERROR2012-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
>>> #
>>>
>

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Massimo Di Pierro
Ok. this is in trunk. Still need testing, there may be other issues. The 
$HOME in that line assumes this is running on GAE (or linux) and not on 
Windows.

On Monday, 13 August 2012 13:10:03 UTC-5, Jonathan Lundell wrote:
>
> Change '/applications/' to os.sep + 'applications' + os.sep
>
> On Aug 13, 2012, at 10:40 AM, Alexei Vinidiktov 
> > 
> wrote:
>
> The contents of thread.folder: C:\Users\alexei\Dev\web2py\
> web2py.googlecode.com\applications\vocabilis\databases 
>
> On Mon, Aug 13, 2012 at 11:11 PM, Massimo Di Pierro 
> 
> > wrote:
>
>> any way you can log what is in thread.folder?
>>
>>
>> On Monday, 13 August 2012 10:38:48 UTC-5, Alexei Vinidiktov wrote:
>>
>>> It gives me the error:
>>>
>>> self.folder = thread.folder.split('/**applications/',1)[1] 
>>>
>>> IndexError: list index out of range
>>>
>>> Full traceback:
>>>
>>> ERROR2012-08-13 15:36:00,799 dal.py:6586] DEBUG: connect attempt 0, 
>>> connection error:
>>> Traceback (most recent call last):
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\we**b2py.googlecode.com
>>> \gluon\dal.**py", line 6573, in __init__
>>> self._adapter = ADAPTERS[self._dbname](*args)
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\we**b2py.googlecode.com
>>> \gluon\dal.**py", line 3845, in __init__
>>>  self.folder = thread.folder.split('/**applications/',1)[1] 
>>> IndexError: list index out of range
>>>
>>>
>>> On Mon, Aug 13, 2012 at 11:06 AM, Massimo Di Pierro <
>>> massimo@gmail.com> wrote:
>>>
 Can you try replace

 self.folder = folder or '$HOME/'+thread.folder.split('
 /applications/',1)[1]

 with

 self.folder = thread.folder.split('**/**applications/',1)[1]





 On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:

> Ok. I've managed to connect to MySQL from GAE local dev server on 
> Windows if I change line 3845 in dal.py to this:
>
> self.folder = ""
>
> instead of (self.folder = folder or '$HOME/'+thread.folder.split('
> /applications/',1)[1])
>
> I don't know if it breaks anything though.
>
> On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov <
> alexei.v...@gmail.com> wrote:
>
>> The problem is still not resolved in trunk.
>>
>>
>> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov <
>> alexei.v...@gmail.com> wrote:
>>
>>> Here it is: db = DAL('google:sql://**vocabilispro**ject:vocabilis/**
>>> vocabilis')
>>>
>>> I pass the password and the user name via App Launcher parameters as 
>>> suggested in the GAE SDK docs: --mysql_user=root 
>>> --mysql_password=xx 
>>> --mysql_host=localhost --mysql_port=3306 
>>>  
>>>
>>> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
>>> massimo@gmail.com> wrote:
>>>
  Can you show your complete connection string (masking any password 
 of course)?


 On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:

>
>
> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
> alexei.v...@gmail.com> wrote:
>
>> 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=xx 
>> --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:
>>
>> 
>> ERROR2012-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\vo**cabilis.net\gluon\dal.py",
>>  
>> line 5955, in __init__
>>  self._adapter = ADAPTERS[self._dbname](*args)
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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 rd

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Jonathan Lundell
Change '/applications/' to os.sep + 'applications' + os.sep

On Aug 13, 2012, at 10:40 AM, Alexei Vinidiktov  
wrote:

> The contents of thread.folder: 
> C:\Users\alexei\Dev\web2py\web2py.googlecode.com\applications\vocabilis\databases
>  
> 
> On Mon, Aug 13, 2012 at 11:11 PM, Massimo Di Pierro 
>  wrote:
> any way you can log what is in thread.folder?
> 
> 
> On Monday, 13 August 2012 10:38:48 UTC-5, Alexei Vinidiktov wrote:
> It gives me the error:
> 
> self.folder = thread.folder.split('/applications/',1)[1] 
> 
> IndexError: list index out of range
> 
> Full traceback:
> 
> ERROR2012-08-13 15:36:00,799 dal.py:6586] DEBUG: connect attempt 0, 
> connection error:
> Traceback (most recent call last):
>   File "C:\Users\alexei\Dev\web2py\web2py.googlecode.com\gluon\dal.py", line 
> 6573, in __init__
> self._adapter = ADAPTERS[self._dbname](*args)
>   File "C:\Users\alexei\Dev\web2py\web2py.googlecode.com\gluon\dal.py", line 
> 3845, in __init__
> self.folder = thread.folder.split('/applications/',1)[1] 
> IndexError: list index out of range
> 
> 
> On Mon, Aug 13, 2012 at 11:06 AM, Massimo Di Pierro  
> wrote:
> Can you try replace
> 
> self.folder = folder or '$HOME/'+thread.folder.split('/applications/',1)[1]
> 
> with
> 
> self.folder = thread.folder.split('/applications/',1)[1]
> 
> 
> 
> 
> 
> On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:
> Ok. I've managed to connect to MySQL from GAE local dev server on Windows if 
> I change line 3845 in dal.py to this:
> 
> self.folder = ""
> 
> instead of (self.folder = folder or 
> '$HOME/'+thread.folder.split('/applications/',1)[1])
> 
> I don't know if it breaks anything though.
> 
> On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov  
> wrote:
> The problem is still not resolved in trunk.
> 
> 
> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov  
> wrote:
> Here it is: db = DAL('google:sql://vocabilisproject:vocabilis/vocabilis')
> 
> I pass the password and the user name via App Launcher parameters as 
> suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx 
> --mysql_host=localhost --mysql_port=3306 
> 
> 
> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro  
> wrote:
> Can you show your complete connection string (masking any password of course)?
> 
> 
> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
> 
> 
> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov  
> wrote:
> 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=xx --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:
> 
> 
> ERROR2012-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': 'xx', 'unix_socket': '', 'host': 'localhost', 
> 'port': 3306, 'user': 'root'}
> ERROR2012-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)
> 
> ERROR2012-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

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Alexei Vinidiktov
The contents of thread.folder: C:\Users\alexei\Dev\web2py\
web2py.googlecode.com\applications\vocabilis\databases

On Mon, Aug 13, 2012 at 11:11 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> any way you can log what is in thread.folder?
>
>
> On Monday, 13 August 2012 10:38:48 UTC-5, Alexei Vinidiktov wrote:
>
>> It gives me the error:
>>
>> self.folder = thread.folder.split('/**applications/',1)[1]
>>
>> IndexError: list index out of range
>>
>> Full traceback:
>>
>> ERROR2012-08-13 15:36:00,799 dal.py:6586] DEBUG: connect attempt 0,
>> connection error:
>> Traceback (most recent call last):
>>   File 
>> "C:\Users\alexei\Dev\web2py\we**b2py.googlecode.com
>> \gluon\dal.**py", line 6573, in __init__
>> self._adapter = ADAPTERS[self._dbname](*args)
>>   File 
>> "C:\Users\alexei\Dev\web2py\we**b2py.googlecode.com
>> \gluon\dal.**py", line 3845, in __init__
>>  self.folder = thread.folder.split('/**applications/',1)[1]
>> IndexError: list index out of range
>>
>>
>> On Mon, Aug 13, 2012 at 11:06 AM, Massimo Di Pierro <
>> massimo@gmail.com> wrote:
>>
>>> Can you try replace
>>>
>>> self.folder = folder or '$HOME/'+thread.folder.split('
>>> /applications/',1)[1]
>>>
>>> with
>>>
>>> self.folder = thread.folder.split('**/**applications/',1)[1]
>>>
>>>
>>>
>>>
>>>
>>> On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:
>>>
 Ok. I've managed to connect to MySQL from GAE local dev server on
 Windows if I change line 3845 in dal.py to this:

 self.folder = ""

 instead of (self.folder = folder or '$HOME/'+thread.folder.split('
 /applications/',1)[1])

 I don't know if it breaks anything though.

 On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov <
 alexei.v...@gmail.com> wrote:

> The problem is still not resolved in trunk.
>
>
> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov <
> alexei.v...@gmail.com> wrote:
>
>> Here it is: db = DAL('google:sql://**vocabilispro**ject:vocabilis/**
>> vocabilis')
>>
>> I pass the password and the user name via App Launcher parameters as
>> suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx
>> --mysql_host=localhost --mysql_port=3306
>>
>>
>> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
>> massimo@gmail.com> wrote:
>>
>>>  Can you show your complete connection string (masking any password
>>> of course)?
>>>
>>>
>>> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>>>


 On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
 alexei.v...@gmail.com> wrote:

> 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=xx
> --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:
>
> 
> ERROR2012-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\vo**cabilis.net\gluon\dal.py",
> line 5955, in __init__
>  self._adapter = ADAPTERS[self._dbname](*args)
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host':
> 'localhost', 'port': 3306, 'user': 'root'}
> ERROR2012-08-04 06:42:35,153 warnings.py:29]
> C:\Users\alexei\Dev\web2py\voc**abilis.net\gluon\dal.py:1386:
> Warning: Can't create database 'vocabilis'; database exists
>   ret = self.cursor.execute(*a, **b)
>
> ERROR2012-08-04 06:42:35,575 restricted.py:155] Traceback
>

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Massimo Di Pierro
any way you can log what is in thread.folder?

On Monday, 13 August 2012 10:38:48 UTC-5, Alexei Vinidiktov wrote:
>
> It gives me the error:
>
> self.folder = thread.folder.split('/applications/',1)[1] 
>
> IndexError: list index out of range
>
> Full traceback:
>
> ERROR2012-08-13 15:36:00,799 dal.py:6586] DEBUG: connect attempt 0, 
> connection error:
> Traceback (most recent call last):
>   File "C:\Users\alexei\Dev\web2py\web2py.googlecode.com\gluon\dal.py", 
> line 6573, in __init__
> self._adapter = ADAPTERS[self._dbname](*args)
>   File "C:\Users\alexei\Dev\web2py\web2py.googlecode.com\gluon\dal.py", 
> line 3845, in __init__
> self.folder = thread.folder.split('/applications/',1)[1] 
> IndexError: list index out of range
>
>
> On Mon, Aug 13, 2012 at 11:06 AM, Massimo Di Pierro 
> 
> > wrote:
>
>> Can you try replace
>>
>> self.folder = folder or '$HOME/'+thread.folder.split('**
>> /applications/',1)[1]
>>
>> with
>>
>> self.folder = thread.folder.split('**/applications/',1)[1]
>>
>>
>>
>>
>>
>> On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:
>>
>>> Ok. I've managed to connect to MySQL from GAE local dev server on 
>>> Windows if I change line 3845 in dal.py to this:
>>>
>>> self.folder = ""
>>>
>>> instead of (self.folder = folder or '$HOME/'+thread.folder.split('**
>>> /applications/',1)[1])
>>>
>>> I don't know if it breaks anything though.
>>>
>>> On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov >> > wrote:
>>>
 The problem is still not resolved in trunk.


 On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov <
 alexei.v...@gmail.com> wrote:

> Here it is: db = DAL('google:sql://**vocabilisproject:vocabilis/**
> vocabilis')
>
> I pass the password and the user name via App Launcher parameters as 
> suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx 
> --mysql_host=localhost --mysql_port=3306 
>  
>
> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
> massimo@gmail.com> wrote:
>
>>  Can you show your complete connection string (masking any password 
>> of course)?
>>
>>
>> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>>
>>>
>>>
>>> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
>>> alexei.v...@gmail.com> wrote:
>>>
 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=xx 
 --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:

 
 ERROR2012-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': 'xx', 'unix_socket': '', 'host': 
 'localhost', 'port': 3306, 'user': 'root'}
 ERROR2012-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)

 ERROR2012-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(**reque**st, response)
   File 
 "C:\Users\alexei\Dev\web2py\vocabilis.net\gluon\globals.py",
  
 line 561, in _try_store_in_db
 record_id 

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Alexei Vinidiktov
It gives me the error:

self.folder = thread.folder.split('/applications/',1)[1]

IndexError: list index out of range

Full traceback:

ERROR2012-08-13 15:36:00,799 dal.py:6586] DEBUG: connect attempt 0,
connection error:
Traceback (most recent call last):
  File "C:\Users\alexei\Dev\web2py\web2py.googlecode.com\gluon\dal.py",
line 6573, in __init__
self._adapter = ADAPTERS[self._dbname](*args)
  File "C:\Users\alexei\Dev\web2py\web2py.googlecode.com\gluon\dal.py",
line 3845, in __init__
self.folder = thread.folder.split('/applications/',1)[1]
IndexError: list index out of range


On Mon, Aug 13, 2012 at 11:06 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Can you try replace
>
> self.folder = folder or '$HOME/'+thread.folder.split('**
> /applications/',1)[1]
>
> with
>
> self.folder = thread.folder.split('**/applications/',1)[1]
>
>
>
>
>
> On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:
>
>> Ok. I've managed to connect to MySQL from GAE local dev server on Windows
>> if I change line 3845 in dal.py to this:
>>
>> self.folder = ""
>>
>> instead of (self.folder = folder or '$HOME/'+thread.folder.split('**
>> /applications/',1)[1])
>>
>> I don't know if it breaks anything though.
>>
>> On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov 
>> wrote:
>>
>>> The problem is still not resolved in trunk.
>>>
>>>
>>> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov <
>>> alexei.v...@gmail.com> wrote:
>>>
 Here it is: db = DAL('google:sql://**vocabilisproject:vocabilis/**
 vocabilis')

 I pass the password and the user name via App Launcher parameters as
 suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx
 --mysql_host=localhost --mysql_port=3306


 On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
 massimo@gmail.com> wrote:

>  Can you show your complete connection string (masking any password of
> course)?
>
>
> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>
>>
>>
>> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
>> alexei.v...@gmail.com> wrote:
>>
>>> 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=xx
>>> --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:
>>>
>>> 
>>> ERROR2012-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': 'xx', 'unix_socket': '', 'host':
>>> 'localhost', 'port': 3306, 'user': 'root'}
>>> ERROR2012-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)
>>>
>>> ERROR2012-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(**reque**st, 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

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-12 Thread Massimo Di Pierro
Can you try replace

self.folder = folder or '$HOME/'+thread.folder.split('/applications/',1)[1]

with

self.folder = thread.folder.split('/applications/',1)[1]





On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:
>
> Ok. I've managed to connect to MySQL from GAE local dev server on Windows 
> if I change line 3845 in dal.py to this:
>
> self.folder = ""
>
> instead of (self.folder = folder or 
> '$HOME/'+thread.folder.split('/applications/',1)[1])
>
> I don't know if it breaks anything though.
>
> On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov 
> 
> > wrote:
>
>> The problem is still not resolved in trunk.
>>
>>
>> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov 
>> 
>> > wrote:
>>
>>> Here it is: db = DAL('google:sql://vocabilisproject:vocabilis/vocabilis')
>>>
>>> I pass the password and the user name via App Launcher parameters as 
>>> suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx 
>>> --mysql_host=localhost --mysql_port=3306 
>>>
>>>
>>> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro 
>>> 
>>> > wrote:
>>>
 Can you show your complete connection string (masking any password of 
 course)?


 On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>
>
>
> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
> alexei.v...@gmail.com > wrote:
>
>> 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=xx 
>> --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:
>>
>> 
>> ERROR2012-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\vo**cabilis.net\gluon\dal.py",
>>  
>> line 5955, in __init__
>> self._adapter = ADAPTERS[self._dbname](*args)
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host': 
>> 'localhost', 'port': 3306, 'user': 'root'}
>> ERROR2012-08-04 06:42:35,153 warnings.py:29] 
>> C:\Users\alexei\Dev\web2py\voc**abilis.net 
>> \gluon\dal.py:1386: 
>> Warning: Can't create database 'vocabilis'; database exists
>>   ret = self.cursor.execute(*a, **b)
>>
>> ERROR2012-08-04 06:42:35,575 restricted.py:155] Traceback (most 
>> recent call last):
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
>>  
>> line 510, in wsgibase
>> session._try_store_in_db(**request, response)
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
>>  
>> line 561, in _try_store_in_db
>> record_id = table.insert(**dd)
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
>>  
>> line 6829, in insert
>> return self._db._adapter.insert(self,**self._listify(fields))
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host': 
>> 'localhost', 'port': 3306, 'user': 'root'}
>> ERROR2012-08-04 06:44:45,828 restricted.py:155] Traceback

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-10 Thread Massimo Di Pierro
can you please open a ticket?

On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote:
>
> Ok. I've managed to connect to MySQL from GAE local dev server on Windows 
> if I change line 3845 in dal.py to this:
>
> self.folder = ""
>
> instead of (self.folder = folder or 
> '$HOME/'+thread.folder.split('/applications/',1)[1])
>
> I don't know if it breaks anything though.
>
> On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov 
> 
> > wrote:
>
>> The problem is still not resolved in trunk.
>>
>>
>> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov 
>> 
>> > wrote:
>>
>>> Here it is: db = DAL('google:sql://vocabilisproject:vocabilis/vocabilis')
>>>
>>> I pass the password and the user name via App Launcher parameters as 
>>> suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx 
>>> --mysql_host=localhost --mysql_port=3306 
>>>
>>>
>>> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro 
>>> 
>>> > wrote:
>>>
 Can you show your complete connection string (masking any password of 
 course)?


 On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>
>
>
> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
> alexei.v...@gmail.com > wrote:
>
>> 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=xx 
>> --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:
>>
>> 
>> ERROR2012-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\vo**cabilis.net\gluon\dal.py",
>>  
>> line 5955, in __init__
>> self._adapter = ADAPTERS[self._dbname](*args)
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host': 
>> 'localhost', 'port': 3306, 'user': 'root'}
>> ERROR2012-08-04 06:42:35,153 warnings.py:29] 
>> C:\Users\alexei\Dev\web2py\voc**abilis.net 
>> \gluon\dal.py:1386: 
>> Warning: Can't create database 'vocabilis'; database exists
>>   ret = self.cursor.execute(*a, **b)
>>
>> ERROR2012-08-04 06:42:35,575 restricted.py:155] Traceback (most 
>> recent call last):
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
>>  
>> line 510, in wsgibase
>> session._try_store_in_db(**request, response)
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
>>  
>> line 561, in _try_store_in_db
>> record_id = table.insert(**dd)
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
>>  
>> line 6829, in insert
>> return self._db._adapter.insert(self,**self._listify(fields))
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host': 
>> 'localhost', 'port': 3306, 'user': 'root'}
>> ERROR2012-08-04 06:44:45,828 restricted.py:155] Traceback (most 
>> recent call last):
>>   File 
>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-08 Thread Alexei Vinidiktov
Ok. I've managed to connect to MySQL from GAE local dev server on Windows
if I change line 3845 in dal.py to this:

self.folder = ""

instead of (self.folder = folder or
'$HOME/'+thread.folder.split('/applications/',1)[1])

I don't know if it breaks anything though.

On Thu, Aug 9, 2012 at 6:03 AM, Alexei Vinidiktov <
alexei.vinidik...@gmail.com> wrote:

> The problem is still not resolved in trunk.
>
>
> On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov <
> alexei.vinidik...@gmail.com> wrote:
>
>> Here it is: db = DAL('google:sql://vocabilisproject:vocabilis/vocabilis')
>>
>> I pass the password and the user name via App Launcher parameters as
>> suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx
>> --mysql_host=localhost --mysql_port=3306
>>
>>
>> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
>> massimo.dipie...@gmail.com> wrote:
>>
>>> Can you show your complete connection string (masking any password of
>>> course)?
>>>
>>>
>>> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:



 On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
 alexei.vinidik...@gmail.com> wrote:

> 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=xx --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:
>
> 
> ERROR2012-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\vo**cabilis.net\gluon\dal.py",
> line 5955, in __init__
> self._adapter = ADAPTERS[self._dbname](*args)
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host':
> 'localhost', 'port': 3306, 'user': 'root'}
> ERROR2012-08-04 06:42:35,153 warnings.py:29]
> C:\Users\alexei\Dev\web2py\voc**abilis.net 
> \gluon\dal.py:1386:
> Warning: Can't create database 'vocabilis'; database exists
>   ret = self.cursor.execute(*a, **b)
>
> ERROR2012-08-04 06:42:35,575 restricted.py:155] Traceback (most
> recent call last):
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
> line 510, in wsgibase
> session._try_store_in_db(**request, response)
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
> line 561, in _try_store_in_db
> record_id = table.insert(**dd)
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
> line 6829, in insert
> return self._db._adapter.insert(self,**self._listify(fields))
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host':
> 'localhost', 'port': 3306, 'user': 'root'}
> ERROR2012-08-04 06:44:45,828 restricted.py:155] Traceback (most
> recent call last):
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
> line 510, in wsgibase
> session._try_store_in_db(**request, response)
>   File 
> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
> line 561, in _try_store_in_db
> record_id = table.

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-08 Thread Alexei Vinidiktov
The problem is still not resolved in trunk.

On Mon, Aug 6, 2012 at 12:56 PM, Alexei Vinidiktov <
alexei.vinidik...@gmail.com> wrote:

> Here it is: db = DAL('google:sql://vocabilisproject:vocabilis/vocabilis')
>
> I pass the password and the user name via App Launcher parameters as
> suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx
> --mysql_host=localhost --mysql_port=3306
>
>
> On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> Can you show your complete connection string (masking any password of
>> course)?
>>
>>
>> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>>>
>>>
>>>
>>> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
>>> alexei.vinidik...@gmail.com> wrote:
>>>
 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=xx --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:

 
 ERROR2012-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\vo**cabilis.net\gluon\dal.py",
 line 5955, in __init__
 self._adapter = ADAPTERS[self._dbname](*args)
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host':
 'localhost', 'port': 3306, 'user': 'root'}
 ERROR2012-08-04 06:42:35,153 warnings.py:29]
 C:\Users\alexei\Dev\web2py\voc**abilis.net 
 \gluon\dal.py:1386:
 Warning: Can't create database 'vocabilis'; database exists
   ret = self.cursor.execute(*a, **b)

 ERROR2012-08-04 06:42:35,575 restricted.py:155] Traceback (most
 recent call last):
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
 line 510, in wsgibase
 session._try_store_in_db(**request, response)
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
 line 561, in _try_store_in_db
 record_id = table.insert(**dd)
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
 line 6829, in insert
 return self._db._adapter.insert(self,**self._listify(fields))
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host':
 'localhost', 'port': 3306, 'user': 'root'}
 ERROR2012-08-04 06:44:45,828 restricted.py:155] Traceback (most
 recent call last):
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
 line 510, in wsgibase
 session._try_store_in_db(**request, response)
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
 line 561, in _try_store_in_db
 record_id = table.insert(**dd)
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
 line 6829, in insert
 return self._db._adapter.insert(self,**self._listify(fields))
   File 
 "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
 line 928, in insert
 raise e
 ProgrammingError: (1146, "Table 'vocabilis3.web2py_session_**vocabilis'
 doesn't exist")
 ###

 So the applica

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-05 Thread Alexei Vinidiktov
Here it is: db = DAL('google:sql://vocabilisproject:vocabilis/vocabilis')

I pass the password and the user name via App Launcher parameters as
suggested in the GAE SDK docs: --mysql_user=root --mysql_password=xx
--mysql_host=localhost --mysql_port=3306

On Mon, Aug 6, 2012 at 7:59 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Can you show your complete connection string (masking any password of
> course)?
>
>
> On Saturday, 4 August 2012 02:11:30 UTC-5, Alexei Vinidiktov wrote:
>>
>>
>>
>> On Sat, Aug 4, 2012 at 1:56 PM, Alexei Vinidiktov <
>> alexei.vinidik...@gmail.com> wrote:
>>
>>> 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=xx --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:
>>>
>>> 
>>> ERROR2012-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\vo**cabilis.net\gluon\dal.py",
>>> line 5955, in __init__
>>> self._adapter = ADAPTERS[self._dbname](*args)
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host':
>>> 'localhost', 'port': 3306, 'user': 'root'}
>>> ERROR2012-08-04 06:42:35,153 warnings.py:29]
>>> C:\Users\alexei\Dev\web2py\voc**abilis.net 
>>> \gluon\dal.py:1386:
>>> Warning: Can't create database 'vocabilis'; database exists
>>>   ret = self.cursor.execute(*a, **b)
>>>
>>> ERROR2012-08-04 06:42:35,575 restricted.py:155] Traceback (most
>>> recent call last):
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
>>> line 510, in wsgibase
>>> session._try_store_in_db(**request, response)
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
>>> line 561, in _try_store_in_db
>>> record_id = table.insert(**dd)
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
>>> line 6829, in insert
>>> return self._db._adapter.insert(self,**self._listify(fields))
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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': 'xx', 'unix_socket': '', 'host':
>>> 'localhost', 'port': 3306, 'user': 'root'}
>>> ERROR2012-08-04 06:44:45,828 restricted.py:155] Traceback (most
>>> recent call last):
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\main.py",
>>> line 510, in wsgibase
>>> session._try_store_in_db(**request, response)
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\globals.py",
>>> line 561, in _try_store_in_db
>>> record_id = table.insert(**dd)
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.net\gluon\dal.py",
>>> line 6829, in insert
>>> return self._db._adapter.insert(self,**self._listify(fields))
>>>   File 
>>> "C:\Users\alexei\Dev\web2py\vo**cabilis.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
>>>
>>>
>>>
>> I had a connection string with "migrate_enabled=False". I tried removing
>> it, then I got this error message:
>>
>>