[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-02 Thread webmaster
Well, I spun up a test server on GAE and it works fine with my app.  So now 
my best guess is that the problem is specific to OSX.  Anyone else have a 
mac to test on?  I'm afraid I only have the one.

On Tuesday, May 2, 2017 at 6:26:45 AM UTC-7, Karoly Kantor wrote:
>
>
> Dear Massimo,
>
> As you are looking into this particular issue, may I please suggest that 
> you test it with a 2nd generation Google Cloud SQL instance? That would, 
> with the same effort, automatically address the issue I have raised 
> earlier. (Google declared 1st generation Cloud SQL instances "legacy", so 
> this seems logical anyway.)
>
> Thank you!
>

-- 
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/d/optout.


[web2py] Re: Error when trying to use Google Cloud SQL

2017-05-02 Thread webmaster
Are you using OSX?  I have the same error and am trying to track down the 
problem.  Right now I think it might be something specific to macs.

On Tuesday, April 25, 2017 at 7:33:01 AM UTC-7, Jonathan Tomm wrote:
>
> I'm struggling to get a basic test app deployed to Google App Engine using 
> Cloud SQL.
>
> 1. I cloned web2py of github two days ago.
>
> 2. I created a Google Cloud SQL instance.
>
> 3. I created a new sample app called "SQL" using the web2py admin 
> interface.
>
> 4. On the new app, I changed the following line in db.py
>
> db = DAL('google:datastore+ndb')
>
> to
>
> db = DAL('google:sql://web2py-test-165504:my-sql-instance/mysql')
>
> 5. I deployed web2py to GAE:
>
> gcloud app deploy --project web2py-test-165504
>
> After deployment, I can view the Welcome app no problem, since it is using 
> Datastore. But when I go to my app called "SQL", I get an error.
>
> Here is the traceback:
>
> ERROR2017-04-24 22:51:17,829 restricted.py:171] Traceback (most recent 
> call last):
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\restricted.py",
>  
> line 216, in restricted
> exec(ccode, environment)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\applications\SQL\models\db.py",
>  
> line 39, in 
> db1 = DAL('google:sql://root:web2py-test-165504/mydatabase')
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\base.py",
>  
> line 170, in __call__
> obj = super(MetaDAL, cls).__call__(*args, **kwargs)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\base.py",
>  
> line 475, in __init__
> "Failure to connect, tried %d times:\n%s" % (attempts, tb)
> RuntimeError: Failure to connect, tried 5 times:
> Traceback (most recent call last):
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\base.py",
>  
> line 455, in __init__
> self._adapter = adapter(**kwargs)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\adapters\__init__.py",
>  
> line 40, in __call__
> obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\adapters\google.py",
>  
> line 40, in __init__
> super(GoogleSQL, self).__init__(*args, **kwargs)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\adapters\base.py",
>  
> line 367, in __init__
> super(SQLAdapter, self).__init__(*args, **kwargs)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\adapters\base.py",
>  
> line 50, in __init__
> self._initialize_(do_connect)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\adapters\google.py",
>  
> line 49, in _initialize_
> super(MySQL, self)._initialize_(do_connect)
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\adapters\base.py",
>  
> line 63, in _initialize_
> self._find_work_folder()
>   File 
> "C:\Users\Jonathan\Documents\Python\GoogleAppEngine\web2py\gluon\packages\dal\pydal\adapters\google.py",
>  
> line 44, in _find_work_folder
> super(GoogleSQL)._find_work_folder()
> AttributeError: 'super' object has no attribute '_find_work_folder'
>
>
> I've also tried connecting to a local MySQL server following Massimo's 
> directions here: 
> https://groups.google.com/forum/#!topic/web2py/SJJBp1dq7VU
>
> When I do, I get exactly the same error.
>
> Any help would be appreciated!
>

-- 
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/d/optout.


[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-01 Thread webmaster
I guess if you can't replicate, the full error might be helpful:

ERROR2017-05-02 02:36:08,394 restricted.py:171] Traceback (most recent 
call last):

  File "/Users/sin/Dev/Trytha/web2py/gluon/restricted.py", line 216, in 
restricted

exec(ccode, environment)

  File "/Users/sin/Dev/Trytha/web2py/applications/welcome/models/db.py", 
line 40, in 

db = DAL('google:sql://trytha-1104:test4/test4')

  File "/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/base.py", 
line 170, in __call__

obj = super(MetaDAL, cls).__call__(*args, **kwargs)

  File "/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/base.py", 
line 475, in __init__

"Failure to connect, tried %d times:\n%s" % (attempts, tb)

RuntimeError: Failure to connect, tried 5 times:

Traceback (most recent call last):

  File "/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/base.py", 
line 455, in __init__

self._adapter = adapter(**kwargs)

  File 
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/__init__.py"
, line 40, in __call__

obj = super(AdapterMeta, cls).__call__(*args, **kwargs)

  File 
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py", 
line 40, in __init__

super(GoogleSQL, self).__init__(*args, **kwargs)

  File 
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 367, in __init__

super(SQLAdapter, self).__init__(*args, **kwargs)

  File 
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 50, in __init__

self._initialize_(do_connect)

  File 
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py", 
line 49, in _initialize_

super(MySQL, self)._initialize_(do_connect)

  File 
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 63, in _initialize_

self._find_work_folder()

  File 
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py", 
line 44, in _find_work_folder

super(GoogleSQL)._find_work_folder()

AttributeError: 'super' object has no attribute '_find_work_folder'

I'll see if I can get everything working in a different environment.


On Monday, May 1, 2017 at 6:51:42 PM UTC-7, Dave S wrote:
>
>
>
> On Monday, May 1, 2017 at 6:09:42 PM UTC-7, webm...@trytha.com wrote:
>>
>> I could zip that up into an app if you like, but I can literally change 
>> any portion of that connection string and have it work in the old version 
>> of pydal and not work in the new version (in a completely fresh web2py 
>> install which I performed while I wrote the steps to replicate).  This is 
>> also a shiny, fresh OSX install, so I can't see this being some sort of 
>> interaction specific to my computer.
>>
>>
> Ok, fair enough.
>
> /dps
>
>
>  
>
>> On Monday, May 1, 2017 at 5:56:14 PM UTC-7, webm...@trytha.com wrote:
>>>
>>> The steps are kinda simple:
>>>
>>> 1. Install web2py:
>>> git clone --recursive https://github.com/web2py/web2py.git
>>>
>>>
>>> 2. Move gaehandler.py and app.yaml into the web2py directory.
>>>
>>> 3. In the Welcome app, change the GAE connection string in db.py to:  
>>> db = DAL('google:sql://[$project]:[$instance]/[$database]')
>>>
>>> 4. Run GAE from command prompt:
>>>
>>> python /Dev/Trytha/google-cloud-sdk/bin/dev_appserver.py --host=0.0.0.0 
>>> --mysql_host=localhost --mysql_port=3306 --mysql_user=root --
>>> mysql_password='[$password]' /Dev/Trytha/web2py
>>>
>>> 5. At this point, the Welcome app gives the error I just posted where 
>>> super() doesn't have _find_work_folder() but if you change just pydal to a 
>>> working version (2.12.2, for instance), it will work fine.  Don't even need 
>>> to relaunch anything, you can just hot swap between broken and working 
>>> versions of pydal (how I found the specific commit that broke everything).
>>>
>>>
>>> On Monday, May 1, 2017 at 5:29:55 PM UTC-7, Dave S wrote:



 On Monday, May 1, 2017 at 4:30:59 PM UTC-7, webm...@trytha.com wrote:
>
> Here is the error from the current version of pydal when trying to 
> connect to Cloud SQL (my memory is better than I thought):
>
>   File 
> "/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py", 
> line 44, in _find_work_folder
>
> super(GoogleSQL)._find_work_folder()
>
> AttributeError: 'super' object has no attribute '_find_work_folder'
>
>
>
>

 If I read the other thread correctly, Massimo couldn't reproduce your 
 error (and AIUI, he uses GAE in his own projects).  Do you have a sample 
 app that shows the error?

 /dps


  

> On Monday, May 1, 2017 at 8:56:47 AM UTC-7, webm...@trytha.com wrote:
>>
>> Ah, I think the problem might actually be slightly different, but the 
>> solution is the same.  If I recall correctly, the error I was getting 
>> said 
>> something about super() not having a method called something like 
>> _find_work_folde

[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-01 Thread webmaster
Ah, I think the reason he couldn't replicate it last time was because it 
was a different error that he had already fixed.  The SQL was broken during 
15.x, I believe, then working for a very short period (1 day) during 16.03, 
then broken again in a different way.

On Monday, May 1, 2017 at 6:09:42 PM UTC-7, webm...@trytha.com wrote:
>
> I could zip that up into an app if you like, but I can literally change 
> any portion of that connection string and have it work in the old version 
> of pydal and not work in the new version (in a completely fresh web2py 
> install which I performed while I wrote the steps to replicate).  This is 
> also a shiny, fresh OSX install, so I can't see this being some sort of 
> interaction specific to my computer.
>
> On Monday, May 1, 2017 at 5:56:14 PM UTC-7, webm...@trytha.com wrote:
>>
>> The steps are kinda simple:
>>
>> 1. Install web2py:
>> git clone --recursive https://github.com/web2py/web2py.git
>>
>>
>> 2. Move gaehandler.py and app.yaml into the web2py directory.
>>
>> 3. In the Welcome app, change the GAE connection string in db.py to:  
>> db = DAL('google:sql://[$project]:[$instance]/[$database]')
>>
>> 4. Run GAE from command prompt:
>>
>> python /Dev/Trytha/google-cloud-sdk/bin/dev_appserver.py --host=0.0.0.0 
>> --mysql_host=localhost --mysql_port=3306 --mysql_user=root --
>> mysql_password='[$password]' /Dev/Trytha/web2py
>>
>> 5. At this point, the Welcome app gives the error I just posted where 
>> super() doesn't have _find_work_folder() but if you change just pydal to a 
>> working version (2.12.2, for instance), it will work fine.  Don't even need 
>> to relaunch anything, you can just hot swap between broken and working 
>> versions of pydal (how I found the specific commit that broke everything).
>>
>>
>> On Monday, May 1, 2017 at 5:29:55 PM UTC-7, Dave S wrote:
>>>
>>>
>>>
>>> On Monday, May 1, 2017 at 4:30:59 PM UTC-7, webm...@trytha.com wrote:

 Here is the error from the current version of pydal when trying to 
 connect to Cloud SQL (my memory is better than I thought):

   File "/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py"
 , line 44, in _find_work_folder

 super(GoogleSQL)._find_work_folder()

 AttributeError: 'super' object has no attribute '_find_work_folder'




>>>
>>> If I read the other thread correctly, Massimo couldn't reproduce your 
>>> error (and AIUI, he uses GAE in his own projects).  Do you have a sample 
>>> app that shows the error?
>>>
>>> /dps
>>>
>>>
>>>  
>>>
 On Monday, May 1, 2017 at 8:56:47 AM UTC-7, webm...@trytha.com wrote:
>
> Ah, I think the problem might actually be slightly different, but the 
> solution is the same.  If I recall correctly, the error I was getting 
> said 
> something about super() not having a method called something like 
> _find_work_folder().  I can give you the exact error when I get home 
> later 
> today.
>
> On Monday, May 1, 2017 at 8:53:01 AM UTC-7, webm...@trytha.com wrote:
>>
>> Same problems as I detailed on this thread:
>>
>> https://groups.google.com/forum/#!topic/web2py/XsSvnbGzzws
>>
>> Basically, it seems like it was fixed and then immediately broken 
>> again.  The commit I mention above is the one where it was broken again.
>>
>> On Monday, May 1, 2017 at 7:21:12 AM UTC-7, Massimo Di Pierro wrote:
>>>
>>> Can you provide a quick summary of the problem you are having with 
>>> Cloud SQL? 
>>> I will make it a priority to fix it.
>>>
>>> On Sunday, 30 April 2017 18:47:19 UTC-5, webm...@trytha.com wrote:

 Figured this should have a new topic because it's been a year 
 without two massive bugs being addressed.  The last version of DAL 
 that 
 fully works with Cloud SQL I'm aware of is 2.12.2...  Yes, it's been 
 broken 
 THAT long.

 To get Cloud SQL working, you have to replace pydal in gluon with 
 an older version (16.03 works but was immediately broken by a commit 
 on the 
 same day).

 I went through github and this seems to be the last commit that 
 broke Cloud SQL (the version of pydal from the previous commit seems 
 to 
 work fine):  
 https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a

 Also, my post at the following link is the only way to get lost 
 password requests working on GAE right now:  
 https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw

 Could one of the mods mark my final answer on that link as "best 
 answer" since I can't do it on my own post?

>>>

-- 
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

[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-01 Thread webmaster
I could zip that up into an app if you like, but I can literally change any 
portion of that connection string and have it work in the old version of 
pydal and not work in the new version (in a completely fresh web2py install 
which I performed while I wrote the steps to replicate).  This is also a 
shiny, fresh OSX install, so I can't see this being some sort of 
interaction specific to my computer.

On Monday, May 1, 2017 at 5:56:14 PM UTC-7, webm...@trytha.com wrote:
>
> The steps are kinda simple:
>
> 1. Install web2py:
> git clone --recursive https://github.com/web2py/web2py.git
>
>
> 2. Move gaehandler.py and app.yaml into the web2py directory.
>
> 3. In the Welcome app, change the GAE connection string in db.py to:  
> db = DAL('google:sql://[$project]:[$instance]/[$database]')
>
> 4. Run GAE from command prompt:
>
> python /Dev/Trytha/google-cloud-sdk/bin/dev_appserver.py --host=0.0.0.0 --
> mysql_host=localhost --mysql_port=3306 --mysql_user=root --mysql_password=
> '[$password]' /Dev/Trytha/web2py
>
> 5. At this point, the Welcome app gives the error I just posted where 
> super() doesn't have _find_work_folder() but if you change just pydal to a 
> working version (2.12.2, for instance), it will work fine.  Don't even need 
> to relaunch anything, you can just hot swap between broken and working 
> versions of pydal (how I found the specific commit that broke everything).
>
>
> On Monday, May 1, 2017 at 5:29:55 PM UTC-7, Dave S wrote:
>>
>>
>>
>> On Monday, May 1, 2017 at 4:30:59 PM UTC-7, webm...@trytha.com wrote:
>>>
>>> Here is the error from the current version of pydal when trying to 
>>> connect to Cloud SQL (my memory is better than I thought):
>>>
>>>   File "/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py", 
>>> line 44, in _find_work_folder
>>>
>>> super(GoogleSQL)._find_work_folder()
>>>
>>> AttributeError: 'super' object has no attribute '_find_work_folder'
>>>
>>>
>>>
>>>
>>
>> If I read the other thread correctly, Massimo couldn't reproduce your 
>> error (and AIUI, he uses GAE in his own projects).  Do you have a sample 
>> app that shows the error?
>>
>> /dps
>>
>>
>>  
>>
>>> On Monday, May 1, 2017 at 8:56:47 AM UTC-7, webm...@trytha.com wrote:

 Ah, I think the problem might actually be slightly different, but the 
 solution is the same.  If I recall correctly, the error I was getting said 
 something about super() not having a method called something like 
 _find_work_folder().  I can give you the exact error when I get home later 
 today.

 On Monday, May 1, 2017 at 8:53:01 AM UTC-7, webm...@trytha.com wrote:
>
> Same problems as I detailed on this thread:
>
> https://groups.google.com/forum/#!topic/web2py/XsSvnbGzzws
>
> Basically, it seems like it was fixed and then immediately broken 
> again.  The commit I mention above is the one where it was broken again.
>
> On Monday, May 1, 2017 at 7:21:12 AM UTC-7, Massimo Di Pierro wrote:
>>
>> Can you provide a quick summary of the problem you are having with 
>> Cloud SQL? 
>> I will make it a priority to fix it.
>>
>> On Sunday, 30 April 2017 18:47:19 UTC-5, webm...@trytha.com wrote:
>>>
>>> Figured this should have a new topic because it's been a year 
>>> without two massive bugs being addressed.  The last version of DAL that 
>>> fully works with Cloud SQL I'm aware of is 2.12.2...  Yes, it's been 
>>> broken 
>>> THAT long.
>>>
>>> To get Cloud SQL working, you have to replace pydal in gluon with an 
>>> older version (16.03 works but was immediately broken by a commit on 
>>> the 
>>> same day).
>>>
>>> I went through github and this seems to be the last commit that 
>>> broke Cloud SQL (the version of pydal from the previous commit seems to 
>>> work fine):  
>>> https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a
>>>
>>> Also, my post at the following link is the only way to get lost 
>>> password requests working on GAE right now:  
>>> https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw
>>>
>>> Could one of the mods mark my final answer on that link as "best 
>>> answer" since I can't do it on my own post?
>>>
>>

-- 
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/d/optout.


[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-01 Thread webmaster
The steps are kinda simple:

1. Install web2py:
git clone --recursive https://github.com/web2py/web2py.git


2. Move gaehandler.py and app.yaml into the web2py directory.

3. In the Welcome app, change the GAE connection string in db.py to:  
db = DAL('google:sql://[$project]:[$instance]/[$database]')

4. Run GAE from command prompt:

python /Dev/Trytha/google-cloud-sdk/bin/dev_appserver.py --host=0.0.0.0 --
mysql_host=localhost --mysql_port=3306 --mysql_user=root --mysql_password=
'[$password]' /Dev/Trytha/web2py

5. At this point, the Welcome app gives the error I just posted where 
super() doesn't have _find_work_folder() but if you change just pydal to a 
working version (2.12.2, for instance), it will work fine.  Don't even need 
to relaunch anything, you can just hot swap between broken and working 
versions of pydal (how I found the specific commit that broke everything).


On Monday, May 1, 2017 at 5:29:55 PM UTC-7, Dave S wrote:
>
>
>
> On Monday, May 1, 2017 at 4:30:59 PM UTC-7, webm...@trytha.com wrote:
>>
>> Here is the error from the current version of pydal when trying to 
>> connect to Cloud SQL (my memory is better than I thought):
>>
>>   File "/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py", 
>> line 44, in _find_work_folder
>>
>> super(GoogleSQL)._find_work_folder()
>>
>> AttributeError: 'super' object has no attribute '_find_work_folder'
>>
>>
>>
>>
>
> If I read the other thread correctly, Massimo couldn't reproduce your 
> error (and AIUI, he uses GAE in his own projects).  Do you have a sample 
> app that shows the error?
>
> /dps
>
>
>  
>
>> On Monday, May 1, 2017 at 8:56:47 AM UTC-7, webm...@trytha.com wrote:
>>>
>>> Ah, I think the problem might actually be slightly different, but the 
>>> solution is the same.  If I recall correctly, the error I was getting said 
>>> something about super() not having a method called something like 
>>> _find_work_folder().  I can give you the exact error when I get home later 
>>> today.
>>>
>>> On Monday, May 1, 2017 at 8:53:01 AM UTC-7, webm...@trytha.com wrote:

 Same problems as I detailed on this thread:

 https://groups.google.com/forum/#!topic/web2py/XsSvnbGzzws

 Basically, it seems like it was fixed and then immediately broken 
 again.  The commit I mention above is the one where it was broken again.

 On Monday, May 1, 2017 at 7:21:12 AM UTC-7, Massimo Di Pierro wrote:
>
> Can you provide a quick summary of the problem you are having with 
> Cloud SQL? 
> I will make it a priority to fix it.
>
> On Sunday, 30 April 2017 18:47:19 UTC-5, webm...@trytha.com wrote:
>>
>> Figured this should have a new topic because it's been a year without 
>> two massive bugs being addressed.  The last version of DAL that fully 
>> works 
>> with Cloud SQL I'm aware of is 2.12.2...  Yes, it's been broken THAT 
>> long.
>>
>> To get Cloud SQL working, you have to replace pydal in gluon with an 
>> older version (16.03 works but was immediately broken by a commit on the 
>> same day).
>>
>> I went through github and this seems to be the last commit that broke 
>> Cloud SQL (the version of pydal from the previous commit seems to work 
>> fine):  
>> https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a
>>
>> Also, my post at the following link is the only way to get lost 
>> password requests working on GAE right now:  
>> https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw
>>
>> Could one of the mods mark my final answer on that link as "best 
>> answer" since I can't do it on my own post?
>>
>

-- 
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/d/optout.


[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-01 Thread webmaster
Here is the error from the current version of pydal when trying to connect 
to Cloud SQL (my memory is better than I thought):

  File "/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py", 
line 44, in _find_work_folder

super(GoogleSQL)._find_work_folder()

AttributeError: 'super' object has no attribute '_find_work_folder'



On Monday, May 1, 2017 at 8:56:47 AM UTC-7, webm...@trytha.com wrote:
>
> Ah, I think the problem might actually be slightly different, but the 
> solution is the same.  If I recall correctly, the error I was getting said 
> something about super() not having a method called something like 
> _find_work_folder().  I can give you the exact error when I get home later 
> today.
>
> On Monday, May 1, 2017 at 8:53:01 AM UTC-7, webm...@trytha.com wrote:
>>
>> Same problems as I detailed on this thread:
>>
>> https://groups.google.com/forum/#!topic/web2py/XsSvnbGzzws
>>
>> Basically, it seems like it was fixed and then immediately broken again. 
>>  The commit I mention above is the one where it was broken again.
>>
>> On Monday, May 1, 2017 at 7:21:12 AM UTC-7, Massimo Di Pierro wrote:
>>>
>>> Can you provide a quick summary of the problem you are having with Cloud 
>>> SQL? 
>>> I will make it a priority to fix it.
>>>
>>> On Sunday, 30 April 2017 18:47:19 UTC-5, webm...@trytha.com wrote:

 Figured this should have a new topic because it's been a year without 
 two massive bugs being addressed.  The last version of DAL that fully 
 works 
 with Cloud SQL I'm aware of is 2.12.2...  Yes, it's been broken THAT long.

 To get Cloud SQL working, you have to replace pydal in gluon with an 
 older version (16.03 works but was immediately broken by a commit on the 
 same day).

 I went through github and this seems to be the last commit that broke 
 Cloud SQL (the version of pydal from the previous commit seems to work 
 fine):  
 https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a

 Also, my post at the following link is the only way to get lost 
 password requests working on GAE right now:  
 https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw

 Could one of the mods mark my final answer on that link as "best 
 answer" since I can't do it on my own post?

>>>

-- 
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/d/optout.


[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-01 Thread webmaster
Ah, I think the problem might actually be slightly different, but the 
solution is the same.  If I recall correctly, the error I was getting said 
something about super() not having a method called something like 
_find_work_folder().  I can give you the exact error when I get home later 
today.

On Monday, May 1, 2017 at 8:53:01 AM UTC-7, webm...@trytha.com wrote:
>
> Same problems as I detailed on this thread:
>
> https://groups.google.com/forum/#!topic/web2py/XsSvnbGzzws
>
> Basically, it seems like it was fixed and then immediately broken again. 
>  The commit I mention above is the one where it was broken again.
>
> On Monday, May 1, 2017 at 7:21:12 AM UTC-7, Massimo Di Pierro wrote:
>>
>> Can you provide a quick summary of the problem you are having with Cloud 
>> SQL? 
>> I will make it a priority to fix it.
>>
>> On Sunday, 30 April 2017 18:47:19 UTC-5, webm...@trytha.com wrote:
>>>
>>> Figured this should have a new topic because it's been a year without 
>>> two massive bugs being addressed.  The last version of DAL that fully works 
>>> with Cloud SQL I'm aware of is 2.12.2...  Yes, it's been broken THAT long.
>>>
>>> To get Cloud SQL working, you have to replace pydal in gluon with an 
>>> older version (16.03 works but was immediately broken by a commit on the 
>>> same day).
>>>
>>> I went through github and this seems to be the last commit that broke 
>>> Cloud SQL (the version of pydal from the previous commit seems to work 
>>> fine):  
>>> https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a
>>>
>>> Also, my post at the following link is the only way to get lost password 
>>> requests working on GAE right now:  
>>> https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw
>>>
>>> Could one of the mods mark my final answer on that link as "best answer" 
>>> since I can't do it on my own post?
>>>
>>

-- 
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/d/optout.


[web2py] Re: Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-05-01 Thread webmaster
Same problems as I detailed on this thread:

https://groups.google.com/forum/#!topic/web2py/XsSvnbGzzws

Basically, it seems like it was fixed and then immediately broken again. 
 The commit I mention above is the one where it was broken again.

On Monday, May 1, 2017 at 7:21:12 AM UTC-7, Massimo Di Pierro wrote:
>
> Can you provide a quick summary of the problem you are having with Cloud 
> SQL? 
> I will make it a priority to fix it.
>
> On Sunday, 30 April 2017 18:47:19 UTC-5, webm...@trytha.com  
> wrote:
>>
>> Figured this should have a new topic because it's been a year without two 
>> massive bugs being addressed.  The last version of DAL that fully works 
>> with Cloud SQL I'm aware of is 2.12.2...  Yes, it's been broken THAT long.
>>
>> To get Cloud SQL working, you have to replace pydal in gluon with an 
>> older version (16.03 works but was immediately broken by a commit on the 
>> same day).
>>
>> I went through github and this seems to be the last commit that broke 
>> Cloud SQL (the version of pydal from the previous commit seems to work 
>> fine):  
>> https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a
>>
>> Also, my post at the following link is the only way to get lost password 
>> requests working on GAE right now:  
>> https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw
>>
>> Could one of the mods mark my final answer on that link as "best answer" 
>> since I can't do it on my own post?
>>
>

-- 
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/d/optout.


[web2py] Why do the devs hate GAE? (two huge bugs and their stupid solutions)

2017-04-30 Thread webmaster
Figured this should have a new topic because it's been a year without two 
massive bugs being addressed.  The last version of DAL that fully works 
with Cloud SQL I'm aware of is 2.12.2...  Yes, it's been broken THAT long.

To get Cloud SQL working, you have to replace pydal in gluon with an older 
version (16.03 works but was immediately broken by a commit on the same 
day).

I went through github and this seems to be the last commit that broke Cloud 
SQL (the version of pydal from the previous commit seems to work fine): 
 https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a

Also, my post at the following link is the only way to get lost password 
requests working on GAE right now: 
 https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw

Could one of the mods mark my final answer on that link as "best answer" 
since I can't do it on my own post?

-- 
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/d/optout.


[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2017-04-30 Thread webmaster
Have you completely given up on Cloud SQL support?  I just checked back 
after a year and it's STILL broken.  The last version of DAL that works 
with Cloud SQL I'm aware of is 2.12.2...

The original hack I detail at the top is still the only way to get Cloud 
SQL working...

OK, I went through github and this is this seems to be the last commit that 
broke Cloud SQL (the version of pydal from the previous commit seems to 
work fine): 
 https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a

Also, this is the only way to get lost password requests working on GAE 
right now:  https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw



On Monday, March 21, 2016 at 5:50:40 PM UTC-7, Massimo Di Pierro wrote:
>
> please try the latest nightly build from the web page.
>
> On Monday, 21 March 2016 19:21:31 UTC-5, webm...@trytha.com  
> wrote:
>>
>> Cool beans.  Look forward to giving it a whirl.
>>
>> On Monday, March 21, 2016 at 3:29:48 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> we will post a new stable version tomorrow I think.
>>>
>>> On Monday, 21 March 2016 00:41:15 UTC-5, webm...@trytha.com wrote:

 From the git repo, yes.  From the current source files on web2py.com, 
 no.

 On Sunday, March 20, 2016 at 10:22:20 PM UTC-7, Massimo Di Pierro wrote:
>
> So can you confirm the latest pydal works for you?
>
> On Saturday, 19 March 2016 16:57:11 UTC-5, webm...@trytha.com wrote:
>>
>> And thus we discover the true problem.  Try using pydal from 
>> http://www.web2py.com/examples/static/web2py_src.zip (the link from 
>> Source Code for Normal Users).  -result:  Failure
>>
>> Now try the pydal from 
>> http://web2py.com/examples/static/2.12.2/web2py_src.zip -result: 
>>  Success
>>
>> Now try the pydal from 
>> http://web2py.com/examples/static/2.13.3/web2py_src.zip (apparently 
>> the latest one accessible by specific version number) -result:  Failure
>>
>> So. I hate you so much right now.  Give me back my two days!
>>
>> There needs to be a way to mark your own answer as the "best 
>> answer"...
>>
>>
>> On Saturday, March 19, 2016 at 1:09:16 PM UTC-7, Massimo Di Pierro 
>> wrote:
>>>
>>> I tested this. I am using trunk code with latest github and I cannot 
>>> reproduce. I am pretty sure this is fixed. Make sure you have the 
>>> latest 
>>> pydal.
>>>
>>> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com wrote:

 Steps to replicate (3 mins):


1. Load Web2py from source off website.  Copy gaehandler.py and 
app.yaml to /web2py.  
2. In applications/welcome/models/db.py, change the DAL 
connection to "db = 
 DAL('google:sql://[$project]:[$instance]/[$database]')"
3. python dev_appserver.py --host=0.0.0.0 
--mysql_host=localhost --mysql_port=3306 --mysql_user=root 
--mysql_password= /home/www-data/web2py
4. Load, then refresh the Welcome app and it crashes because it 
thinks it can't access the /databases folder.

 Solution (1 min):

1. Delete /gluon/packages/dal/pydal
2. Replace with /gluon/packages/dal/pydal from version 2.12.2 
of web2py.  (
http://web2py.com/examples/static/2.12.2/web2py_src.zip)

 Am I doing something really crazy?  How has nobody run across this 
 in the six months it's been broken?  Seems like kind of a massive bug.

>>>

-- 
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/d/optout.


[web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2017-04-17 Thread webmaster
Please mark this as "Best Answer".  It uses web2py's internal password 
reset mechanism.  Just gave it a fairly thorough testing.  I really 
appreciate the people who gave help in this thread and a couple others 
about resetting passwords.  This should mostly suffice until we get a real 
solution (though I make no strong statement about security).

*views/default/reset_password.html*

{{=form}}

*default.py [Include this somewhere under def user()]*

if request.args[0] == 'request_reset_password':
redirect(URL('default','reset_password'))

*default.py*

def reset_password():
# EXP: Import UUID module from gluon.
from gluon.utils import web2py_uuid



# EXP: Define variables.
# NOTE: No idea how long this is... and any shorter number breaks it, I 
think...
max_time = 1000



# EXP: Create a form that will return "E-mail Address Unknown" if the email 
can't be found.
form = SQLFORM.factory(
Field('email', requires = [IS_EMAIL(error_message='Email Address Unknown'),
IS_IN_DB(db, 'auth_user.email', error_message='Email Address Unknown')]))

# EXP: If the email address is valid, process a password reset email.
if form.process().accepted:

# EXP: Find the user whose email matches the request.
user = db(db.auth_user.email == form.vars.email).select().first()


# EXP: Generate a one-time key to allow password reset. Web2py's uuid 
method allows duplication across instances.
reset_password_key = str(int(max_time)) + '-' + web2py_uuid()

# TODO: Find a way to encrypt the key before uploading it to DB that works 
with web2py's internal password reset system.
user.update_record(reset_password_key = reset_password_key)

# EXP: Send an email with a password reset link to the entered email 
address.
message = ' Retrieve your password for Trytha.com Please 
use the link below to reset your password.  Reset Password If you did not 
initiate this password reset, please ignore this email. '

mail.send(to = [user.email],
subject = 'Reset your password at Trytha.com',
message = message)

session.flash = 'Email sent'


# # TODO: Forward to login page with forward_page variable.
redirect(URL('default','index'))


elif form.errors:
response.flash = 'Wrong E-mail Address'


return dict(form=form)




On Friday, April 14, 2017 at 12:13:10 AM UTC-7, Jacinto Parga wrote:
>
> Yes it is easy to change anyone password, but you still have to access to 
> his/hers email to set the final password. Anyway it is not the right 
> solution. There was no problem with 2.13 versions.
>
>  
>
> El viernes, 14 de abril de 2017, 0:55:50 (UTC+2), webm...@trytha.com 
> escribió:
>>
>> Can we not get a real solution to this?  I was gonna try the posted hack, 
>> but it can be too easily abused (it changes the user's password instead of 
>> using a password_reset token, so anyone could change your password just by 
>> knowing your email address).
>>
>> On Friday, April 7, 2017 at 7:28:48 PM UTC-7, webm...@trytha.com wrote:
>>>
>>> Thanks for bringing this issue back up and posting a workaround.  
>>>
>>> The worst part is the way to fix this is probably about as easy as 
>>> wrapping something in "str()", just need to know how the web2py internals 
>>> all link together.
>>>
>>> On Thursday, April 6, 2017 at 4:51:17 AM UTC-7, Karoly Kantor wrote:

 Thanks, this helped, i am now using my own function to send the 
 password reset email.

 On Friday, March 31, 2017 at 2:51:03 PM UTC+2, Jacinto Parga wrote:
>
> Yes, still unresolved.
>
> I did a workaround for the request_reset_password: 
>
> def user(): 
> if request.args(0)=='request_reset_password':
> redirect(URL('default','myrequestpass'))
> return dict(form=auth())
>
> def myrequestpass():
> form = SQLFORM.factory(
> Field('u_email', requires =[IS_EMAIL(error_message='Wrong 
> email'), IS_IN_DB(db, 'auth_user.email', error_message='Address not in 
> DB')]),
>   table_name='solicitar_pass')
> if form.process().accepted:
> user = 
> db(db.auth_user.email==form.vars.u_email).select().first()
> session.flash = 'Comprueba tu correo '+str(user.first_name)
> u_passwd = str(hex(int(time.time([2:]
> 
> user.update_record(password=CRYPT()(u_passwd.encode('utf8'))[0])
> mensaje=' Retrieve your password Temporal 
> password :  '+ u_passwd   +'   Login with the 
> temporal 
> password and set your new password in this link :https://yoursite.com/user/login?_next=/user/change_password";>Change 
> Password''
> mail.send(to=[form.vars.u_email],
> subject='Change your password, follow this link',
> message=mensaje)
> redirect(URL('default','index'))
> elif form.errors:
> response.flash = 'Wrong Email address'
> return dict(form=form)
>
>
> But anyway the lazyT found is an annoying error width, for instance: 

[web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2017-04-13 Thread webmaster
Can we not get a real solution to this?  I was gonna try the posted hack, 
but it can be too easily abused (it changes the user's password instead of 
using a password_reset token, so anyone could change your password just by 
knowing your email address).

On Friday, April 7, 2017 at 7:28:48 PM UTC-7, webm...@trytha.com wrote:
>
> Thanks for bringing this issue back up and posting a workaround.  
>
> The worst part is the way to fix this is probably about as easy as 
> wrapping something in "str()", just need to know how the web2py internals 
> all link together.
>
> On Thursday, April 6, 2017 at 4:51:17 AM UTC-7, Karoly Kantor wrote:
>>
>> Thanks, this helped, i am now using my own function to send the password 
>> reset email.
>>
>> On Friday, March 31, 2017 at 2:51:03 PM UTC+2, Jacinto Parga wrote:
>>>
>>> Yes, still unresolved.
>>>
>>> I did a workaround for the request_reset_password: 
>>>
>>> def user(): 
>>> if request.args(0)=='request_reset_password':
>>> redirect(URL('default','myrequestpass'))
>>> return dict(form=auth())
>>>
>>> def myrequestpass():
>>> form = SQLFORM.factory(
>>> Field('u_email', requires =[IS_EMAIL(error_message='Wrong 
>>> email'), IS_IN_DB(db, 'auth_user.email', error_message='Address not in 
>>> DB')]),
>>>   table_name='solicitar_pass')
>>> if form.process().accepted:
>>> user = db(db.auth_user.email==form.vars.u_email).select().first()
>>> session.flash = 'Comprueba tu correo '+str(user.first_name)
>>> u_passwd = str(hex(int(time.time([2:]
>>> user.update_record(password=CRYPT()(u_passwd.encode('utf8'))[0])
>>> mensaje=' Retrieve your password Temporal 
>>> password :  '+ u_passwd   +'   Login with the temporal 
>>> password and set your new password in this link :https://yoursite.com/user/login?_next=/user/change_password";>Change 
>>> Password''
>>> mail.send(to=[form.vars.u_email],
>>> subject='Change your password, follow this link',
>>> message=mensaje)
>>> redirect(URL('default','index'))
>>> elif form.errors:
>>> response.flash = 'Wrong Email address'
>>> return dict(form=form)
>>>
>>>
>>> But anyway the lazyT found is an annoying error width, for instance: 
>>> auth.settings.auth_two_factor_enabled = True
>>>
>>>
>>> El jueves, 30 de marzo de 2017, 8:13:06 (UTC+2), Karoly Kantor escribió:

 As the issue is still unresolved, i have unchecked the "no action 
 needed" flag on this topic. Any help would be appreciated. Thank you.

 On Thursday, March 30, 2017 at 6:33:07 AM UTC+2, Karoly Kantor wrote:
>
> This issue still seems to be unsolved. I have a fresh installation on 
> GAE, reset password emails fail due to "need string or buffer, lazyT 
> found"
>
> Is there something I can do?
>
> Thanks.
>
> On Friday, July 29, 2016 at 7:49:14 AM UTC+2, webm...@trytha.com 
> wrote:
>>
>> I just uploaded an updated version of web2py to my server, replacing 
>> a much older version (likely 2.12.2), and now it won't send password 
>> recovery emails.  The error in the logs is: 
>>
>> Mail.send failure:coercing to Unicode: need string or buffer, lazyT 
>> found
>>
>> This suggests to me that somehow a string is not properly being 
>> passed.  I gather that lazyT has something to do with the built-in 
>> translation capabilities of web2py?  Probably don't need to be 
>> translating 
>> email addresses (though I guess it could be trying to translate the 
>> recovery message).  Either way, GAE wants nothing to do with it.
>>
>> How can I fix this?
>>
>

-- 
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/d/optout.


[web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2017-04-07 Thread webmaster
Thanks for bringing this issue back up and posting a workaround.  

The worst part is the way to fix this is probably about as easy as wrapping 
something in "str()", just need to know how the web2py internals all link 
together.

On Thursday, April 6, 2017 at 4:51:17 AM UTC-7, Karoly Kantor wrote:
>
> Thanks, this helped, i am now using my own function to send the password 
> reset email.
>
> On Friday, March 31, 2017 at 2:51:03 PM UTC+2, Jacinto Parga wrote:
>>
>> Yes, still unresolved.
>>
>> I did a workaround for the request_reset_password: 
>>
>> def user(): 
>> if request.args(0)=='request_reset_password':
>> redirect(URL('default','myrequestpass'))
>> return dict(form=auth())
>>
>> def myrequestpass():
>> form = SQLFORM.factory(
>> Field('u_email', requires =[IS_EMAIL(error_message='Wrong 
>> email'), IS_IN_DB(db, 'auth_user.email', error_message='Address not in 
>> DB')]),
>>   table_name='solicitar_pass')
>> if form.process().accepted:
>> user = db(db.auth_user.email==form.vars.u_email).select().first()
>> session.flash = 'Comprueba tu correo '+str(user.first_name)
>> u_passwd = str(hex(int(time.time([2:]
>> user.update_record(password=CRYPT()(u_passwd.encode('utf8'))[0])
>> mensaje=' Retrieve your password Temporal password 
>> :  '+ u_passwd   +'   Login with the temporal password 
>> and set your new password in this link :https://yoursite.com/user/login?_next=/user/change_password";>Change 
>> Password''
>> mail.send(to=[form.vars.u_email],
>> subject='Change your password, follow this link',
>> message=mensaje)
>> redirect(URL('default','index'))
>> elif form.errors:
>> response.flash = 'Wrong Email address'
>> return dict(form=form)
>>
>>
>> But anyway the lazyT found is an annoying error width, for instance: auth
>> .settings.auth_two_factor_enabled = True
>>
>>
>> El jueves, 30 de marzo de 2017, 8:13:06 (UTC+2), Karoly Kantor escribió:
>>>
>>> As the issue is still unresolved, i have unchecked the "no action 
>>> needed" flag on this topic. Any help would be appreciated. Thank you.
>>>
>>> On Thursday, March 30, 2017 at 6:33:07 AM UTC+2, Karoly Kantor wrote:

 This issue still seems to be unsolved. I have a fresh installation on 
 GAE, reset password emails fail due to "need string or buffer, lazyT 
 found"

 Is there something I can do?

 Thanks.

 On Friday, July 29, 2016 at 7:49:14 AM UTC+2, webm...@trytha.com wrote:
>
> I just uploaded an updated version of web2py to my server, replacing a 
> much older version (likely 2.12.2), and now it won't send password 
> recovery 
> emails.  The error in the logs is: 
>
> Mail.send failure:coercing to Unicode: need string or buffer, lazyT 
> found
>
> This suggests to me that somehow a string is not properly being 
> passed.  I gather that lazyT has something to do with the built-in 
> translation capabilities of web2py?  Probably don't need to be 
> translating 
> email addresses (though I guess it could be trying to translate the 
> recovery message).  Either way, GAE wants nothing to do with it.
>
> How can I fix this?
>


-- 
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/d/optout.


[web2py] Login Error not loading when using username

2016-10-07 Thread webmaster
I used this slice to enable usernames for 
login: http://www.web2pyslices.com/slice/show/1642/login-with-username-and-email

For some reason, a failed login doesn't give me an error, just reloads the 
page.  And nothing seems to show up in auth().errors.

I should mention I'm using version 2.12.2 of web2py, but I can't use newer 
ones because they're all broken on GAE.

-- 
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/d/optout.


Re: [web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2016-10-04 Thread webmaster
So has this and the DAL issue with GAE been addressed?  Should I try the 
latest version of web2py or is it a waste of time?  I'd really prefer to 
use a later version because 2.12.2 (the latest version of web2py that fully 
works with GAE) has a bug that logs users out randomly.

Could we just have ONE version of web2py that works completely with GAE? 
 Right now it's like Frankenstein's monster.

On Saturday, September 24, 2016 at 9:11:43 AM UTC-7, Jacinto Parga wrote:
>
>
> Unfortunatly it didn't work for me.
>
> Is it a translation issue? Can it be solved changing the auth_user 
> messages?
>
> I think it is an important bug!! I can send mails with my application form 
> GAE, there is no problem at all. But when someone is singing up it is 
> "Unable to send mail!" Same happens width reset_request_password.
>
> Expecting for solution.
>
>
> El viernes, 23 de septiembre de 2016, 9:05:32 (UTC+2), Mathieu Clabaut 
> escribió:
>>
>> I had a probably similar problem that I solved by patching pydal.
>> See https://github.com/web2py/pydal/issues/403 
>>  and 
>> https://github.com/web2py/pydal/pull/404.
>>
>> However, as mention in the issue thread,  the change shall be done in 
>> web2py.
>>
>> Alas, I did not have time to try to reproduce with a more recent web2py.
>> If you use a recent web2py and the dal PR#404 solves the problem for you, 
>> then I propose that you open a new bug in web2py.
>>
>> Best regards,
>> -Mathieu
>>
>>
>>
>> On Thu, Sep 22, 2016 at 9:17 PM Jacinto Parga  wrote:
>>
>>> The same error when I try to register an user: Unable to send email.
>>>
>>>
>>> Mail.send failure:coercing to Unicode: need string or buffer, lazyT found
>>>
>>> I don't know what to do
>>>
>>>
>>> El domingo, 31 de julio de 2016, 8:36:02 (UTC+2), Massimo Di Pierro 
>>> escribió:
>>>
 OK. will check this today.

 On Friday, 29 July 2016 15:40:26 UTC-5, webm...@trytha.com wrote:
>
> Nope, same error in:  2.14.6-stable+timestamp.2016.05.10.00.21.47 (the 
> source code off the web2py site).
>
> If you want me to try a nightly or something, let me know.
>
> The only semi-unique thing about my app is that I allow usernames for 
> login as well.  Here is my default/user():
>
> def user():
>
> db.auth_user.first_name.writable = False
> db.auth_user.last_name.writable = False
>
> # NOTE: This is an addition I found that enables using usernames 
> (default is email as login).
> if 'login' in request.args:
> db.auth_user.username.label   = T('Username or Email')
> auth.settings.login_userfield = 'username'
> if request.vars.username and not IS_EMAIL()(request.vars.username)[1]:
> auth.settings.login_userfield = 'email'
> request.vars.email= request.vars.username
> request.post_vars.email   = request.vars.email
> request.vars.username = None
> request.post_vars.username= None
>
>
>
> return dict(form = auth())
>
> Everything was working fine in 2.12.2, but I can't say for certain it 
> was working in my 2.13 deployment.
>
>
>
>
> On Friday, July 29, 2016 at 6:26:11 AM UTC-7, Massimo Di Pierro wrote:
>>
>> This may have been fixed already. Can you upgrade and try it?
>>
>> On Friday, 29 July 2016 00:49:14 UTC-5, webm...@trytha.com wrote:
>>>
>>> I just uploaded an updated version of web2py to my server, replacing 
>>> a much older version (likely 2.12.2), and now it won't send password 
>>> recovery emails.  The error in the logs is: 
>>>
>>> Mail.send failure:coercing to Unicode: need string or buffer, lazyT 
>>> found
>>>
>>> This suggests to me that somehow a string is not properly being 
>>> passed.  I gather that lazyT has something to do with the built-in 
>>> translation capabilities of web2py?  Probably don't need to be 
>>> translating 
>>> email addresses (though I guess it could be trying to translate the 
>>> recovery message).  Either way, GAE wants nothing to do with it.
>>>
>>> How can I fix this?
>>>
>> -- 
>>> 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+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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 
"w

Re: [web2py] Re: GAE integration is MASSIVELY broken again (in multiple ways in multiple versions)

2016-09-13 Thread webmaster
Hi Mathieu!  Are you using the default instance_class in your app.yaml?  I 
felt GAE was running a bit slow, but upgrading to the F2 instance_class 
really improved overall response for a very minor increase in cost.  I'd be 
interested to see what scaling options you have set in the app.yaml.

On Tuesday, September 13, 2016 at 11:57:11 AM UTC-7, Mathieu Clabaut wrote:
>
> I also do, but didn't try further than 2.14.6 + some git revisions…
>
> And it makes me realized I still have no test for password reset… I'll add 
> some !
> For now I have quite bad performances on GAE (3 requests / seconds for one 
> instance  when facing 20 simultaneous simulated users → leads to more than 
> 10s response time ! ), and I have to address this difficulty first…
>
> On Tue, Sep 13, 2016 at 4:16 PM > wrote:
>
>> I'm using it!  It's very solid except for these two current issues.  It'd 
>> also be nice if there were some (any) documentation regarding how to use it 
>> with Google Cloud Storage and Google Datastore while also using Google 
>> Cloud SQL.  www.trytha.com
>>
>>
>> On Tuesday, September 13, 2016 at 2:47:43 AM UTC-7, Niphlod wrote:
>>>
>>> I absolutely love when the most used by big guys backend seems to fail 
>>> for the most basic reasons...is someone really using web2py on GAE or it's 
>>> just for show ?
>>>
>>> On Tuesday, September 13, 2016 at 9:02:19 AM UTC+2, webm...@trytha.com 
>>> wrote:

 First, sometime around the 2.13 or 2.14 change, the password reset 
 feature stopped working, as I detail here:  
 https://groups.google.com/forum/?pli=1#!topic/web2py/YndwuzoEypw

 And today I decided to try out the latest version (2.15.x based on 
 changelog) from Git to see if you all had maybe fixed it, but using a 
 completely fresh install from Git made it so my local GAE environment 
 can't 
 even access the DB for some reason.  For reference, I was previously using 
 web2py version 2.14.6, which has a working DAL connection but the password 
 recovery doesn't work.  The associated DAL version is 16.03.  Here is the 
 error when trying to connect to the DB (app name and id are obfuscated):

 ERROR2016-09-13 06:31:57,189 restricted.py:171] Traceback (most 
 recent call last):

   File "/home/www-data/web2py/gluon/restricted.py", line 220, in 
 restricted

 exec(ccode, environment)

   File "/home/www-data/web2py/applications//models/db.py", 
 line 73, in 

 db = DAL('google:sql://:live/', migrate=True) # 
 DEBUG REVIEW: Turn off after migrations.

   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
 170, in __call__

 obj = super(MetaDAL, cls).__call__(*args, **kwargs)

   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
 475, in __init__

 "Failure to connect, tried %d times:\n%s" % (attempts, tb)

 RuntimeError: Failure to connect, tried 5 times:

 Traceback (most recent call last):

   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
 455, in __init__

 self._adapter = adapter(**kwargs)

   File 
 "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/__init__.py", 
 line 
 40, in __call__

 obj = super(AdapterMeta, cls).__call__(*args, **kwargs)

   File 
 "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", line 
 40, in __init__

 super(GoogleSQL, self).__init__(*args, **kwargs)

   File 
 "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
 373, in __init__

 super(SQLAdapter, self).__init__(*args, **kwargs)

   File 
 "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
 51, 
 in __init__

 self._initialize_(do_connect)

   File 
 "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", line 
 49, in _initialize_

 super(MySQL, self)._initialize_(do_connect)

   File 
 "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
 64, 
 in _initialize_

 self._find_work_folder()

   File 
 "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", line 
 44, in _find_work_folder

 super(GoogleSQL)._find_work_folder()

 AttributeError: 'super' object has no attribute '_find_work_folder'


 Version 2.12.2 has neither of these problems.  Please help!  I want to 
 use the latest versions!

>>> -- 
>> 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 fro

[web2py] Re: GAE integration is MASSIVELY broken again (in multiple ways in multiple versions)

2016-09-13 Thread webmaster
I'm using it!  It's very solid except for these two current issues.  It'd 
also be nice if there were some (any) documentation regarding how to use it 
with Google Cloud Storage and Google Datastore while also using Google 
Cloud SQL.  www.trytha.com

On Tuesday, September 13, 2016 at 2:47:43 AM UTC-7, Niphlod wrote:
>
> I absolutely love when the most used by big guys backend seems to fail for 
> the most basic reasons...is someone really using web2py on GAE or it's just 
> for show ?
>
> On Tuesday, September 13, 2016 at 9:02:19 AM UTC+2, webm...@trytha.com 
> wrote:
>>
>> First, sometime around the 2.13 or 2.14 change, the password reset 
>> feature stopped working, as I detail here:  
>> https://groups.google.com/forum/?pli=1#!topic/web2py/YndwuzoEypw
>>
>> And today I decided to try out the latest version (2.15.x based on 
>> changelog) from Git to see if you all had maybe fixed it, but using a 
>> completely fresh install from Git made it so my local GAE environment can't 
>> even access the DB for some reason.  For reference, I was previously using 
>> web2py version 2.14.6, which has a working DAL connection but the password 
>> recovery doesn't work.  The associated DAL version is 16.03.  Here is the 
>> error when trying to connect to the DB (app name and id are obfuscated):
>>
>> ERROR2016-09-13 06:31:57,189 restricted.py:171] Traceback (most 
>> recent call last):
>>
>>   File "/home/www-data/web2py/gluon/restricted.py", line 220, in 
>> restricted
>>
>> exec(ccode, environment)
>>
>>   File "/home/www-data/web2py/applications//models/db.py", line 
>> 73, in 
>>
>> db = DAL('google:sql://:live/', migrate=True) # 
>> DEBUG REVIEW: Turn off after migrations.
>>
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
>> 170, in __call__
>>
>> obj = super(MetaDAL, cls).__call__(*args, **kwargs)
>>
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
>> 475, in __init__
>>
>> "Failure to connect, tried %d times:\n%s" % (attempts, tb)
>>
>> RuntimeError: Failure to connect, tried 5 times:
>>
>> Traceback (most recent call last):
>>
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
>> 455, in __init__
>>
>> self._adapter = adapter(**kwargs)
>>
>>   File 
>> "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 
>> 40, in __call__
>>
>> obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
>>
>>   File 
>> "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", line 
>> 40, in __init__
>>
>> super(GoogleSQL, self).__init__(*args, **kwargs)
>>
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 373, in __init__
>>
>> super(SQLAdapter, self).__init__(*args, **kwargs)
>>
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 51, in __init__
>>
>> self._initialize_(do_connect)
>>
>>   File 
>> "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", line 
>> 49, in _initialize_
>>
>> super(MySQL, self)._initialize_(do_connect)
>>
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 64, in _initialize_
>>
>> self._find_work_folder()
>>
>>   File 
>> "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", line 
>> 44, in _find_work_folder
>>
>> super(GoogleSQL)._find_work_folder()
>>
>> AttributeError: 'super' object has no attribute '_find_work_folder'
>>
>>
>> Version 2.12.2 has neither of these problems.  Please help!  I want to 
>> use the latest versions!
>>
>

-- 
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/d/optout.


[web2py] GAE integration is MASSIVELY broken again (in multiple ways in multiple versions)

2016-09-13 Thread webmaster
First, sometime around the 2.13 or 2.14 change, the password reset feature 
stopped working, as I detail here: 
 https://groups.google.com/forum/?pli=1#!topic/web2py/YndwuzoEypw

And today I decided to try out the latest version (2.15.x based on 
changelog) from Git to see if you all had maybe fixed it, but using a 
completely fresh install from Git made it so my local GAE environment can't 
even access the DB for some reason.  For reference, I was previously using 
web2py version 2.14.6, which has a working DAL connection but the password 
recovery doesn't work.  The associated DAL version is 16.03.  Here is the 
error when trying to connect to the DB (app name and id are obfuscated):

ERROR2016-09-13 06:31:57,189 restricted.py:171] Traceback (most recent 
call last):

  File "/home/www-data/web2py/gluon/restricted.py", line 220, in restricted

exec(ccode, environment)

  File "/home/www-data/web2py/applications//models/db.py", line 
73, in 

db = DAL('google:sql://:live/', migrate=True) # DEBUG 
REVIEW: Turn off after migrations.

  File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 170, 
in __call__

obj = super(MetaDAL, cls).__call__(*args, **kwargs)

  File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 475, 
in __init__

"Failure to connect, tried %d times:\n%s" % (attempts, tb)

RuntimeError: Failure to connect, tried 5 times:

Traceback (most recent call last):

  File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 455, 
in __init__

self._adapter = adapter(**kwargs)

  File 
"/home/www-data/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 
40, in __call__

obj = super(AdapterMeta, cls).__call__(*args, **kwargs)

  File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", 
line 40, in __init__

super(GoogleSQL, self).__init__(*args, **kwargs)

  File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 373, in __init__

super(SQLAdapter, self).__init__(*args, **kwargs)

  File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 51, in __init__

self._initialize_(do_connect)

  File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", 
line 49, in _initialize_

super(MySQL, self)._initialize_(do_connect)

  File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
line 64, in _initialize_

self._find_work_folder()

  File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/google.py", 
line 44, in _find_work_folder

super(GoogleSQL)._find_work_folder()

AttributeError: 'super' object has no attribute '_find_work_folder'


Version 2.12.2 has neither of these problems.  Please help!  I want to use 
the latest versions!

-- 
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/d/optout.


[web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2016-09-05 Thread webmaster
I've been working on a lot of other little things and haven't had a chance 
to test yet.  Is yours also on Google App Engine?

One thing to try would be to use version 2.12.2 of web2py to see if that 
fixes it.  Diagnosing the issue is on my very short list of things to do.

On Monday, September 5, 2016 at 11:39:08 AM UTC-7, Jacinto Parga wrote:
>
> I have the same problem
>
>
> 20:30:08.307Mail.send failure:coercing to Unicode: need string or buffer, 
> lazyT found ( 
> 
> /base/data/home/apps/e~canal-etico-marcafranca/0.395432313309680422/gluon/
> tools.py:808 
> 
> )
>
>
>
>
> El domingo, 31 de julio de 2016, 8:36:02 (UTC+2), Massimo Di Pierro 
> escribió:
>>
>> OK. will check this today.
>>
>> On Friday, 29 July 2016 15:40:26 UTC-5, webm...@trytha.com wrote:
>>>
>>> Nope, same error in:  2.14.6-stable+timestamp.2016.05.10.00.21.47 (the 
>>> source code off the web2py site).
>>>
>>> If you want me to try a nightly or something, let me know.
>>>
>>> The only semi-unique thing about my app is that I allow usernames for 
>>> login as well.  Here is my default/user():
>>>
>>> def user():
>>>
>>> db.auth_user.first_name.writable = False
>>> db.auth_user.last_name.writable = False
>>>
>>> # NOTE: This is an addition I found that enables using usernames 
>>> (default is email as login).
>>> if 'login' in request.args:
>>> db.auth_user.username.label   = T('Username or Email')
>>> auth.settings.login_userfield = 'username'
>>> if request.vars.username and not IS_EMAIL()(request.vars.username)[1]:
>>> auth.settings.login_userfield = 'email'
>>> request.vars.email= request.vars.username
>>> request.post_vars.email   = request.vars.email
>>> request.vars.username = None
>>> request.post_vars.username= None
>>>
>>>
>>>
>>> return dict(form = auth())
>>>
>>> Everything was working fine in 2.12.2, but I can't say for certain it 
>>> was working in my 2.13 deployment.
>>>
>>>
>>>
>>>
>>> On Friday, July 29, 2016 at 6:26:11 AM UTC-7, Massimo Di Pierro wrote:

 This may have been fixed already. Can you upgrade and try it?

 On Friday, 29 July 2016 00:49:14 UTC-5, webm...@trytha.com wrote:
>
> I just uploaded an updated version of web2py to my server, replacing a 
> much older version (likely 2.12.2), and now it won't send password 
> recovery 
> emails.  The error in the logs is: 
>
> Mail.send failure:coercing to Unicode: need string or buffer, lazyT 
> found
>
> This suggests to me that somehow a string is not properly being 
> passed.  I gather that lazyT has something to do with the built-in 
> translation capabilities of web2py?  Probably don't need to be 
> translating 
> email addresses (though I guess it could be trying to translate the 
> recovery message).  Either way, GAE wants nothing to do with it.
>
> How can I fix this?
>


-- 
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/d/optout.


[web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2016-07-31 Thread webmaster
Thanks.  I'll run a couple more tests tomorrow if I haven't heard back.

On Saturday, July 30, 2016 at 11:36:02 PM UTC-7, Massimo Di Pierro wrote:
>
> OK. will check this today.
>
> On Friday, 29 July 2016 15:40:26 UTC-5, webm...@trytha.com  
> wrote:
>>
>> Nope, same error in:  2.14.6-stable+timestamp.2016.05.10.00.21.47 (the 
>> source code off the web2py site).
>>
>> If you want me to try a nightly or something, let me know.
>>
>> The only semi-unique thing about my app is that I allow usernames for 
>> login as well.  Here is my default/user():
>>
>> def user():
>>
>> db.auth_user.first_name.writable = False
>> db.auth_user.last_name.writable = False
>>
>> # NOTE: This is an addition I found that enables using usernames (default 
>> is email as login).
>> if 'login' in request.args:
>> db.auth_user.username.label   = T('Username or Email')
>> auth.settings.login_userfield = 'username'
>> if request.vars.username and not IS_EMAIL()(request.vars.username)[1]:
>> auth.settings.login_userfield = 'email'
>> request.vars.email= request.vars.username
>> request.post_vars.email   = request.vars.email
>> request.vars.username = None
>> request.post_vars.username= None
>>
>>
>>
>> return dict(form = auth())
>>
>> Everything was working fine in 2.12.2, but I can't say for certain it was 
>> working in my 2.13 deployment.
>>
>>
>>
>>
>> On Friday, July 29, 2016 at 6:26:11 AM UTC-7, Massimo Di Pierro wrote:
>>>
>>> This may have been fixed already. Can you upgrade and try it?
>>>
>>> On Friday, 29 July 2016 00:49:14 UTC-5, webm...@trytha.com wrote:

 I just uploaded an updated version of web2py to my server, replacing a 
 much older version (likely 2.12.2), and now it won't send password 
 recovery 
 emails.  The error in the logs is: 

 Mail.send failure:coercing to Unicode: need string or buffer, lazyT 
 found

 This suggests to me that somehow a string is not properly being passed. 
  I gather that lazyT has something to do with the built-in translation 
 capabilities of web2py?  Probably don't need to be translating email 
 addresses (though I guess it could be trying to translate the recovery 
 message).  Either way, GAE wants nothing to do with it.

 How can I fix this?

>>>

-- 
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/d/optout.


[web2py] Re: fake_migrate bug on GAE

2016-07-29 Thread webmaster
Done.

On Friday, July 29, 2016 at 6:26:49 AM UTC-7, Massimo Di Pierro wrote:
>
> Can you please open an issue?
>
> On Thursday, 28 July 2016 03:33:01 UTC-5, webm...@trytha.com  
> wrote:
>>
>> I realize this was a foolish mistake, but there really should be a way to 
>> fix it, and I believe there is not.
>>
>> If you have fake_migrate=True and define a new table, then push to GAE, 
>> you will never be able to use that new table's name for anything else 
>> because GAE doesn't offer access to a directory storing the *.table files. 
>>  Any attempt to migrate after that will show the table doesn't exist (of 
>> course) and web2py will not attempt to create a table in SQL because it 
>> thinks it already exists.
>>
>> Unless there's some other way to delete the table files from GAE?
>>
>

-- 
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/d/optout.


[web2py] Re: Password Recovery Not Sending (lazyT object being passed to GAE?)

2016-07-29 Thread webmaster
Nope, same error in:  2.14.6-stable+timestamp.2016.05.10.00.21.47 (the 
source code off the web2py site).

If you want me to try a nightly or something, let me know.

The only semi-unique thing about my app is that I allow usernames for login 
as well.  Here is my default/user():

def user():

db.auth_user.first_name.writable = False
db.auth_user.last_name.writable = False

# NOTE: This is an addition I found that enables using usernames (default 
is email as login).
if 'login' in request.args:
db.auth_user.username.label   = T('Username or Email')
auth.settings.login_userfield = 'username'
if request.vars.username and not IS_EMAIL()(request.vars.username)[1]:
auth.settings.login_userfield = 'email'
request.vars.email= request.vars.username
request.post_vars.email   = request.vars.email
request.vars.username = None
request.post_vars.username= None



return dict(form = auth())

Everything was working fine in 2.12.2, but I can't say for certain it was 
working in my 2.13 deployment.




On Friday, July 29, 2016 at 6:26:11 AM UTC-7, Massimo Di Pierro wrote:
>
> This may have been fixed already. Can you upgrade and try it?
>
> On Friday, 29 July 2016 00:49:14 UTC-5, webm...@trytha.com  
> wrote:
>>
>> I just uploaded an updated version of web2py to my server, replacing a 
>> much older version (likely 2.12.2), and now it won't send password recovery 
>> emails.  The error in the logs is: 
>>
>> Mail.send failure:coercing to Unicode: need string or buffer, lazyT found
>>
>> This suggests to me that somehow a string is not properly being passed. 
>>  I gather that lazyT has something to do with the built-in translation 
>> capabilities of web2py?  Probably don't need to be translating email 
>> addresses (though I guess it could be trying to translate the recovery 
>> message).  Either way, GAE wants nothing to do with it.
>>
>> How can I fix this?
>>
>

-- 
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/d/optout.


[web2py] Re: fake_migrate bug on GAE

2016-07-28 Thread webmaster
In case someone runs across this, the only solution I've found is to set up 
an IPv4 connection to your Cloud SQL and connect from your local machine. 
 Then delete the ".table" entries corresponding to the pertinent tables 
from the web2py_filesystem table in your DB and run a regular migrate.

On Thursday, July 28, 2016 at 1:33:01 AM UTC-7, webm...@trytha.com wrote:
>
> I realize this was a foolish mistake, but there really should be a way to 
> fix it, and I believe there is not.
>
> If you have fake_migrate=True and define a new table, then push to GAE, 
> you will never be able to use that new table's name for anything else 
> because GAE doesn't offer access to a directory storing the *.table files. 
>  Any attempt to migrate after that will show the table doesn't exist (of 
> course) and web2py will not attempt to create a table in SQL because it 
> thinks it already exists.
>
> Unless there's some other way to delete the table files from GAE?
>

-- 
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/d/optout.


[web2py] Password Recovery Not Sending (lazyT object being passed to GAE?)

2016-07-28 Thread webmaster
I just uploaded an updated version of web2py to my server, replacing a much 
older version, and now it won't send password recovery emails.  The error 
in the logs is: 

Mail.send failure:coercing to Unicode: need string or buffer, lazyT found

This suggests to me that somehow a string is not properly being passed.  I 
gather that lazyT has something to do with the built-in translation 
capabilities of web2py?  Probably don't need to be translating email 
addresses (though I guess it could be trying to translate the recovery 
message).  Either way, GAE wants nothing to do with it.

How can I fix this?

-- 
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/d/optout.


[web2py] fake_migrate bug on GAE

2016-07-28 Thread webmaster
I realize this was a foolish mistake, but there really should be a way to 
fix it, and I believe there is not.

If you have fake_migrate=True and define a new table, then push to GAE, you 
will never be able to use that new table's name for anything else because 
GAE doesn't offer access to a directory storing the *.table files.  Any 
attempt to migrate after that will show the table doesn't exist (of course) 
and web2py will not attempt to create a table in SQL because it thinks it 
already exists.

Unless there's some other way to delete the table files from GAE?

-- 
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/d/optout.


[web2py] Self-contradiction in the book regarding migration?

2016-07-22 Thread webmaster
I'm trying to add a field to my DB in GAE (which is a huge headache for 
some reason?) and was taking a look at the book but noticed this 
self-contradicting statement regarding migrations:

The solution consists of disabling migrations for all tables and enabling 
fake migrations:

1

db.define_table(, migrate=True, fake_migrate=True)


Shouldn't it be "migrate=False, fake_migrate=True"?  Or is the introductory 
sentence wrong?

-- 
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/d/optout.


[web2py] Re: Component within component

2016-04-25 Thread webmaster
Note:  This may also have something to do with fancybox, which is what I 
use for the modal.

On Monday, April 25, 2016 at 3:35:09 PM UTC-7, webm...@trytha.com wrote:
>
> I have the following general setup:
>
> Main Page - basically just a container that holds the...
>
> ...Infinite Pagination Pictures Component - loads 10 pictures and my 
> comment() component (one for each picture), which when clicked, opens the...
>
> ...Picture Modal - a component that loads in a modal on top of the other 
> component to display the picture you clicked on.
>
>
> I use LOAD() for all of these.  Here's my problem:  If I try to load my 
> comment() component in the modal as well, all the comment() components in 
> the Infinite Pagination Pictures Component reload as well.  I have separate 
> namespaces based on whether comment() is in a modal or not, but this seems 
> linked to my need to put "{{include 'web2py_ajax.html'}}" in the view of 
> any component that has components within it.  
>
> Is it just not supported to have a sub-component load a component that is 
> also present in the parent-component?  I actually created an infinite loop 
> doing something similar not long ago.
>
> As a workaround, I've been loading the component with JS calling AJAX, 
> which works fine:
>
> //- Load the comments component.
> span(id="load-comments" 
> data-url="{{=URL('social', 'comments', 'comments.load', 
> vars=dict(pic_id=pic_id, comment_open='True'))}}" 
> data-target="pics-comment-container")
> //- AJAX container to load comments.
> div(id="pics-comment-container")
> //- AJAX call to load comments in the appropriate container.
> script.
> $(document).ready(function (e) {
> elem = $('#load-comments'); // elem = $(e.target)
> url = elem.attr("data-url");
> target = elem.attr("data-target");
> web2py_ajax_page("GET", url, "", target);
> return false; // e.preventDefault()
> });
>
>
>

-- 
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/d/optout.


[web2py] Component within component

2016-04-25 Thread webmaster
I have the following general setup:

Main Page - basically just a container that holds the...

...Infinite Pagination Pictures Component - loads 10 pictures and my 
comment() component (one for each picture), which when clicked, opens the...

...Picture Modal - a component that loads in a modal on top of the other 
component to display the picture you clicked on.


I use LOAD() for all of these.  Here's my problem:  If I try to load my 
comment() component in the modal as well, all the comment() components in 
the Infinite Pagination Pictures Component reload as well.  I have separate 
namespaces based on whether comment() is in a modal or not, but this seems 
linked to my need to put "{{include 'web2py_ajax.html'}}" in the view of 
any component that has components within it.  

Is it just not supported to have a sub-component load a component that is 
also present in the parent-component?  I actually created an infinite loop 
doing something similar not long ago.

As a workaround, I've been loading the component with JS calling AJAX, 
which works fine:

//- Load the comments component.
span(id="load-comments" 
data-url="{{=URL('social', 'comments', 'comments.load', 
vars=dict(pic_id=pic_id, comment_open='True'))}}" 
data-target="pics-comment-container")
//- AJAX container to load comments.
div(id="pics-comment-container")
//- AJAX call to load comments in the appropriate container.
script.
$(document).ready(function (e) {
elem = $('#load-comments'); // elem = $(e.target)
url = elem.attr("data-url");
target = elem.attr("data-target");
web2py_ajax_page("GET", url, "", target);
return false; // e.preventDefault()
});


-- 
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/d/optout.


[web2py] Re: Load component in a ?

2016-03-24 Thread webmaster
Works for my use case, thanks!  Got so wrapped up in not wanting to do 
anything global in my CSS, I completely drew a blank on defining an in-line 
style.  Thanks!

On Thursday, March 24, 2016 at 10:26:50 AM UTC-7, Anthony wrote:
>
> If you're talking about using the LOAD helper, it only generates a DIV, 
> and the JS code only looks for DIVs. Would setting it's display to inline 
> do the trick:
>
> mycomponent = LOAD(..., _style='display:inline')
>
> If not, you should be able to do something like this in the view (not 
> tested):
>
> 
> $.web2py.component('{{=URL(...)}}', 'mycomponent', el=$(
> '#mycomponent'));
>
> Anthony
>
> On Thursday, March 24, 2016 at 12:51:33 PM UTC-4, webm...@trytha.com 
>  wrote:
>>
>> I want my component to load in a span() instead of the default 
>> div(class="data-w2p_remote").  Anyone know the best way to do this?
>>
>

-- 
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/d/optout.


[web2py] Load component in a ?

2016-03-24 Thread webmaster
I want my component to load in a span() instead of the default 
div(class="data-w2p_remote").  Anyone know the best way to do this?

-- 
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/d/optout.


Re: [web2py] Re: web2py 2.14.1 beta

2016-03-23 Thread webmaster
Correct.

On Wednesday, March 23, 2016 at 7:16:07 AM UTC-7, Massimo Di Pierro wrote:
>
> Making sure I understand. Uncommenting these fixed your problem?
>
> # if not 'charset' in driver_args:
>
> # driver_args['charset'] = 'utf8'
>
>
> Massimo
>
>
>
>
> On Wednesday, 23 March 2016 01:05:35 UTC-5, webm...@trytha.com 
>  wrote:
>>
>> I'm on it, Pierbro!
>>
>> Ooh, cool, just found a bug in my code that didn't account for a user 
>> clicking on a requires_login() link after a server restart resulted in them 
>> being logged out with the page still up.  Paying dividends!
>>
>> テスト成功しました、先輩!!萌〜
>>
>> Yeah, that seems to have fixed it (at least for this extremely limited 
>> level of testing).
>>
>> On Tuesday, March 22, 2016 at 10:37:23 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> Can you provide a simple two lines of code to reproduce the problem with 
>>> dev_appserver?
>>>
>>>
>>> On Tuesday, 22 March 2016 20:03:52 UTC-5, webm...@trytha.com wrote:

 Then, as the Japanese say:  ピンポン!

 This is disturbing.  Massimo thinks he *fixed* GAE database stuff in 
 the change from 2.12.2 to 2.12.3, but this is the second thing I've found 
 that went the exact opposite direction.  I wonder if he fixed a bunch of 
 code, then saved over 2.12.2 with the corrected code and accidentally 
 brought forward the non-corrected code into 2.12.3 (where it has sat ever 
 since)?


 On Tuesday, March 22, 2016 at 5:57:23 PM UTC-7, Richard wrote:
>
> Nop!
>
> On Tue, Mar 22, 2016 at 8:53 PM,  wrote:
>
>> Are you using GAE?
>>
>> On Tuesday, March 22, 2016 at 5:42:33 PM UTC-7, Richard wrote:
>>>
>>> I use to store fr uft8 and didn't have any issue with 2.13.4
>>>
>>> Richard
>>>
>>> On Tue, Mar 22, 2016 at 8:33 PM,  wrote:
>>>
 It could possibly be something specific to GAE.  As I said, I don't 
 have time for a lot of tests right now.  Try uploading this in a 
 database 
 somewhere:  テスト

 On Tuesday, March 22, 2016 at 5:29:02 PM UTC-7, Richard wrote:
>
> All my functional tests had passed just fine...
>
> Richard
>
> On Tue, Mar 22, 2016 at 8:15 PM,  wrote:
>
>> Guess I could have posted here first, but it's not an error in 
>> the new version, it's in multiple versions:
>>
>> Unicode is not working in "string" DB entries.  WTF mate?  
>> https://groups.google.com/forum/#!topic/web2py/T5eQExgTP1w
>>
>>
>>
>> On Tuesday, March 22, 2016 at 4:19:15 PM UTC-7, Dave S wrote:
>>>
>>> Never mind, this one is fixed by restarting the web2py instance.
>>>
>>> /dps
>>>
>>>
>>> On Tuesday, March 22, 2016 at 4:16:11 PM UTC-7, Dave S wrote:



 On Monday, March 21, 2016 at 3:38:16 PM UTC-7, Massimo Di 
 Pierro wrote:
>
> Please help us check it (for testers version)
>
> http://web2py.com/init/default/download
>
> and let us know if it does not work with your code. I will be 
> released as stable in 2 days. So better check it sooner rather 
> than later.
>
>
 I'm also seeing a problem with my simplistic routes.py (works 
 in 2.13.4) 

 routers = dict(
 BASE=dict( default_application='uploader'),
 )


 The uploader application is okay, the welcome appli (cation is 
 okay, but the alternate -- stupid.css -- version called welstoop 
 is ending 
 up in uploader,
 even with an explicit a/c/f URL (
 http://127.0.0.1:8000/welstoop/default/index).

 Renaming routes.py to old-routes.py fixes the symptoms.

 /dps

 -- 
>> 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+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
 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 

Re: [web2py] Re: new Starter app (alternative to Welcome app)

2016-03-22 Thread webmaster
Really dig that responsive transition when changing window sizes.  I know 
it will never be seen by a non-programmer, but it looks totally sweet. 
 Need to work that in to my own apps.

If we could get all the web2py HTML in a Jade version, that'd be pretty 
awesome, too.  Much more pleasant to go between Python and Jade than Python 
and HTML.  Likewise with Stylus, but I roll my own CSS, so that's less 
compelling on a personal level.  If you haven't tried it, Jade is basically 
Python syntax for HTML and Stylus is (to a lesser extent) Python syntax for 
CSS.  Both transpile perfectly into their respective languages.  There's 
also Coffeescript (Python-like JS), but that's just putting lipstick on a 
pig.

I'll mark all this down as a back-burner side project.

On Tuesday, March 22, 2016 at 10:47:46 PM UTC-7, Encompass solutions wrote:
>
> I agree Massimo.  We should have a small wizard to help select what kind 
> of layout we would want.
> Blank
> Stupid CSS
> This one
> Bookstrap 3
> Angular example
> etc...
>
> On Wed, Mar 23, 2016 at 7:43 AM, Massimo Di Pierro  > wrote:
>
> this is really nice.  We should make a list of welcome apps so people can 
> pick and choose.
>
> P.S. Have you seen this? (similar but CSS only) .
>
> On Tuesday, 22 March 2016 21:17:41 UTC-5, Michael Beller wrote:
>>
>> I created a new 'starter' app for the types of data and process 
>> management apps I tend to build.
>>
>> I used https://almsaeedstudio.com/preview as the template and I'm 
>> hosting a preview at https://mjbeller.pythonanywhere.com/starter.
>>
>> I'd welcome any feedback but also wanted to share the code at 
>> https://github.com/mjbeller/web2py-starter for anybody that may want to 
>> explore.
>>
>> I started with the goal to create a new web2py app without using the 
>> Welcome app to help me learn a little more about web2py.  I found myself 
>> slowly adding more and more code (primarily CSS and JS) from the Welcome 
>> app to support some features such as Smartgrids.  I'd like to evolve 
>> Starter to support the upcoming form.py and grid.py that the core team is 
>> evaluating and developing.
>>
> -- 
> 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+un...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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/d/optout.


Re: [web2py] Re: web2py 2.14.1 beta

2016-03-22 Thread webmaster
I'm on it, Pierbro!

Ooh, cool, just found a bug in my code that didn't account for a user 
clicking on a requires_login() link after a server restart resulted in them 
being logged out with the page still up.  Paying dividends!

テスト成功しました、先輩!!萌〜

Yeah, that seems to have fixed it (at least for this extremely limited 
level of testing).

On Tuesday, March 22, 2016 at 10:37:23 PM UTC-7, Massimo Di Pierro wrote:
>
> Can you provide a simple two lines of code to reproduce the problem with 
> dev_appserver?
>
>
> On Tuesday, 22 March 2016 20:03:52 UTC-5, webm...@trytha.com  
> wrote:
>>
>> Then, as the Japanese say:  ピンポン!
>>
>> This is disturbing.  Massimo thinks he *fixed* GAE database stuff in the 
>> change from 2.12.2 to 2.12.3, but this is the second thing I've found that 
>> went the exact opposite direction.  I wonder if he fixed a bunch of code, 
>> then saved over 2.12.2 with the corrected code and accidentally brought 
>> forward the non-corrected code into 2.12.3 (where it has sat ever since)?
>>
>>
>> On Tuesday, March 22, 2016 at 5:57:23 PM UTC-7, Richard wrote:
>>>
>>> Nop!
>>>
>>> On Tue, Mar 22, 2016 at 8:53 PM,  wrote:
>>>
 Are you using GAE?

 On Tuesday, March 22, 2016 at 5:42:33 PM UTC-7, Richard wrote:
>
> I use to store fr uft8 and didn't have any issue with 2.13.4
>
> Richard
>
> On Tue, Mar 22, 2016 at 8:33 PM,  wrote:
>
>> It could possibly be something specific to GAE.  As I said, I don't 
>> have time for a lot of tests right now.  Try uploading this in a 
>> database 
>> somewhere:  テスト
>>
>> On Tuesday, March 22, 2016 at 5:29:02 PM UTC-7, Richard wrote:
>>>
>>> All my functional tests had passed just fine...
>>>
>>> Richard
>>>
>>> On Tue, Mar 22, 2016 at 8:15 PM,  wrote:
>>>
 Guess I could have posted here first, but it's not an error in the 
 new version, it's in multiple versions:

 Unicode is not working in "string" DB entries.  WTF mate?  
 https://groups.google.com/forum/#!topic/web2py/T5eQExgTP1w



 On Tuesday, March 22, 2016 at 4:19:15 PM UTC-7, Dave S wrote:
>
> Never mind, this one is fixed by restarting the web2py instance.
>
> /dps
>
>
> On Tuesday, March 22, 2016 at 4:16:11 PM UTC-7, Dave S wrote:
>>
>>
>>
>> On Monday, March 21, 2016 at 3:38:16 PM UTC-7, Massimo Di Pierro 
>> wrote:
>>>
>>> Please help us check it (for testers version)
>>>
>>> http://web2py.com/init/default/download
>>>
>>> and let us know if it does not work with your code. I will be 
>>> released as stable in 2 days. So better check it sooner rather than 
>>> later.
>>>
>>>
>> I'm also seeing a problem with my simplistic routes.py (works in 
>> 2.13.4) 
>>
>> routers = dict(
>> BASE=dict( default_application='uploader'),
>> )
>>
>>
>> The uploader application is okay, the welcome appli (cation is 
>> okay, but the alternate -- stupid.css -- version called welstoop is 
>> ending 
>> up in uploader,
>> even with an explicit a/c/f URL (
>> http://127.0.0.1:8000/welstoop/default/index).
>>
>> Renaming routes.py to old-routes.py fixes the symptoms.
>>
>> /dps
>>
>> -- 
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> 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+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
 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" g

Re: [web2py] MASSIVE PyDAL Issue!!! Unicode not working in a "string" type DB entry... ಠ_ಠ

2016-03-22 Thread webmaster
This wasn't an update, it was a fresh install.  Here's what I was 
originally using:  __version__ = '16.03-dev' [FAIL]

Then used my old /pydal from 2.12.2 (which doesn't list a version number in 
init). [PASS]

Then tried whatever was latest on the git site within the last 30 minutes. 
[FAIL]

On Tuesday, March 22, 2016 at 6:44:33 PM UTC-7, Dave S wrote:
>
>
>
> On Tuesday, March 22, 2016 at 6:12:00 PM UTC-7, webm...@trytha.com wrote:
>>
>> My steps:
>>
>> 1.  Notice bug.
>>
>> 2.  Put the /pydal folder from my 2.12.2 version of web2py into my 
>> current project.  Restart server.  It works.
>>
>> 3.  Download a .zip of the gluon/packages/DAL directory from github. 
>>  Replace my 2.12.2 pydal with the new version.  Restart server.  It fails.
>>
>
> What;s the DAL version number or the git changeset number?
>  
>
>>
>> Not a lot of room for mistakes.  And I've actually tested it a couple 
>> different ways since it was easy.  New pydal is fscked for GAE unicode 
>> support.
>>
>>
> Detailed version info will help with sorting this out.
>
> /dps
>  
>
>>
>> On Tuesday, March 22, 2016 at 6:07:38 PM UTC-7, Richard wrote:
>>>
>>> pyDAL should be R-2.13.3 : 
>>> https://github.com/web2py/web2py/tree/R-2.13.4/gluon/packages
>>>
>>> On Tue, Mar 22, 2016 at 9:05 PM, Richard Vézina  
>>> wrote:
>>>
 How do you manage your web2py update? Could it happen that you get it 
 from github and upgrade pydal package with a version different from the 
 one 
 used by web2py 2.13.4?

 Can you check you version of pyDAL?

 On Tue, Mar 22, 2016 at 8:12 PM,  wrote:

> You think this is a game?
>
> So...  I just ran into another UNFATHOMABLY, INCONCEIVABLY MASSIVE BUG 
> in the newer PyDAL (i.e. 2.13.4 AND 2.14.1b vs my trusted 2.12.2 
> version).  
> It doesn't remember how to write unicode to the DB now:
>
> ERROR2016-03-22 23:04:47,468 restricted.py:174] Traceback (most 
> recent call last):
>
> ...
>
> UnicodeEncodeError: 'latin-1' codec can't encode characters in 
> position 129-132: ordinal not in range(256)
>
> It's trying to add Japanese characters to my DB in a row defined 
> simply as 'string'.  Worked fine in 2.12.2...  
>
> Let me be clear, this was using 2.13.4 cloned from the git repo just a 
> few days ago.  I then tried the latest 2.14.1b version with identical 
> failure.  Then swapped in my trusted 2.12.2 /pydal directory and 
> everything 
> works fine again.
>
> Quit messing with my emotions!  Time for another version upgrade!!!  
>
> (And maybe someone can write a test for DAL that confirms it accepts 
> unicode before anything is committed to master?  That's a pretty 
> low-level 
> test, right there...  I was amazed when I found Cloud SQL broken 
> (admittedly only on the homepage version of the source (not that it's 
> good 
> to have variation in SAME-VERSION code)), but this makes me worry about 
> the 
> framework at a very basic level.  I mean, I got the impression Web2py was 
> big in Europe, where ASCII is not the standard.)
>
> DISCLAIMER:  Normally I would make a new test app to confirm it's not 
> something in my code, but I'm trying to code features, not debug 
> frameworks,  and since 2.12.2's PyDAL works fine, I'm able to defeat my 
> OCD 
> and talk shit without being absolutely 100% certain I've properly 
> identified the problem.  I apologize if I've made some mistake and am 
> getting worked up over nothing.
>
> -- 
> 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+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


>>>

-- 
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/d/optout.


Re: [web2py] MASSIVE PyDAL Issue!!! Unicode not working in a "string" type DB entry... ಠ_ಠ

2016-03-22 Thread webmaster
My steps:

1.  Notice bug.

2.  Put the /pydal folder from my 2.12.2 version of web2py into my current 
project.  Restart server.  It works.

3.  Download a .zip of the gluon/packages/DAL directory from github. 
 Replace my 2.12.2 pydal with the new version.  Restart server.  It fails.

Not a lot of room for mistakes.  And I've actually tested it a couple 
different ways since it was easy.  New pydal is fscked for GAE unicode 
support.


On Tuesday, March 22, 2016 at 6:07:38 PM UTC-7, Richard wrote:
>
> pyDAL should be R-2.13.3 : 
> https://github.com/web2py/web2py/tree/R-2.13.4/gluon/packages
>
> On Tue, Mar 22, 2016 at 9:05 PM, Richard Vézina  > wrote:
>
>> How do you manage your web2py update? Could it happen that you get it 
>> from github and upgrade pydal package with a version different from the one 
>> used by web2py 2.13.4?
>>
>> Can you check you version of pyDAL?
>>
>> On Tue, Mar 22, 2016 at 8:12 PM, > 
>> wrote:
>>
>>> You think this is a game?
>>>
>>> So...  I just ran into another UNFATHOMABLY, INCONCEIVABLY MASSIVE BUG 
>>> in the newer PyDAL (i.e. 2.13.4 AND 2.14.1b vs my trusted 2.12.2 version).  
>>> It doesn't remember how to write unicode to the DB now:
>>>
>>> ERROR2016-03-22 23:04:47,468 restricted.py:174] Traceback (most 
>>> recent call last):
>>>
>>> ...
>>>
>>> UnicodeEncodeError: 'latin-1' codec can't encode characters in position 
>>> 129-132: ordinal not in range(256)
>>>
>>> It's trying to add Japanese characters to my DB in a row defined simply 
>>> as 'string'.  Worked fine in 2.12.2...  
>>>
>>> Let me be clear, this was using 2.13.4 cloned from the git repo just a 
>>> few days ago.  I then tried the latest 2.14.1b version with identical 
>>> failure.  Then swapped in my trusted 2.12.2 /pydal directory and everything 
>>> works fine again.
>>>
>>> Quit messing with my emotions!  Time for another version upgrade!!!  
>>>
>>> (And maybe someone can write a test for DAL that confirms it accepts 
>>> unicode before anything is committed to master?  That's a pretty low-level 
>>> test, right there...  I was amazed when I found Cloud SQL broken 
>>> (admittedly only on the homepage version of the source (not that it's good 
>>> to have variation in SAME-VERSION code)), but this makes me worry about the 
>>> framework at a very basic level.  I mean, I got the impression Web2py was 
>>> big in Europe, where ASCII is not the standard.)
>>>
>>> DISCLAIMER:  Normally I would make a new test app to confirm it's not 
>>> something in my code, but I'm trying to code features, not debug 
>>> frameworks,  and since 2.12.2's PyDAL works fine, I'm able to defeat my OCD 
>>> and talk shit without being absolutely 100% certain I've properly 
>>> identified the problem.  I apologize if I've made some mistake and am 
>>> getting worked up over nothing.
>>>
>>> -- 
>>> 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+un...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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/d/optout.


Re: [web2py] Re: web2py 2.14.1 beta

2016-03-22 Thread webmaster
Then, as the Japanese say:  ピンポン!

This is disturbing.  Massimo thinks he *fixed* GAE database stuff in the 
change from 2.12.2 to 2.12.3, but this is the second thing I've found that 
went the exact opposite direction.  I wonder if he fixed a bunch of code, 
then saved over 2.12.2 with the corrected code and accidentally brought 
forward the non-corrected code into 2.12.3 (where it has sat ever since)?


On Tuesday, March 22, 2016 at 5:57:23 PM UTC-7, Richard wrote:
>
> Nop!
>
> On Tue, Mar 22, 2016 at 8:53 PM, > wrote:
>
>> Are you using GAE?
>>
>> On Tuesday, March 22, 2016 at 5:42:33 PM UTC-7, Richard wrote:
>>>
>>> I use to store fr uft8 and didn't have any issue with 2.13.4
>>>
>>> Richard
>>>
>>> On Tue, Mar 22, 2016 at 8:33 PM,  wrote:
>>>
 It could possibly be something specific to GAE.  As I said, I don't 
 have time for a lot of tests right now.  Try uploading this in a database 
 somewhere:  テスト

 On Tuesday, March 22, 2016 at 5:29:02 PM UTC-7, Richard wrote:
>
> All my functional tests had passed just fine...
>
> Richard
>
> On Tue, Mar 22, 2016 at 8:15 PM,  wrote:
>
>> Guess I could have posted here first, but it's not an error in the 
>> new version, it's in multiple versions:
>>
>> Unicode is not working in "string" DB entries.  WTF mate?  
>> https://groups.google.com/forum/#!topic/web2py/T5eQExgTP1w
>>
>>
>>
>> On Tuesday, March 22, 2016 at 4:19:15 PM UTC-7, Dave S wrote:
>>>
>>> Never mind, this one is fixed by restarting the web2py instance.
>>>
>>> /dps
>>>
>>>
>>> On Tuesday, March 22, 2016 at 4:16:11 PM UTC-7, Dave S wrote:



 On Monday, March 21, 2016 at 3:38:16 PM UTC-7, Massimo Di Pierro 
 wrote:
>
> Please help us check it (for testers version)
>
> http://web2py.com/init/default/download
>
> and let us know if it does not work with your code. I will be 
> released as stable in 2 days. So better check it sooner rather than 
> later.
>
>
 I'm also seeing a problem with my simplistic routes.py (works in 
 2.13.4) 

 routers = dict(
 BASE=dict( default_application='uploader'),
 )


 The uploader application is okay, the welcome appli (cation is 
 okay, but the alternate -- stupid.css -- version called welstoop is 
 ending 
 up in uploader,
 even with an explicit a/c/f URL (
 http://127.0.0.1:8000/welstoop/default/index).

 Renaming routes.py to old-routes.py fixes the symptoms.

 /dps

 -- 
>> 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+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> 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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/d/optout.


Re: [web2py] Re: web2py 2.14.1 beta

2016-03-22 Thread webmaster
Are you using GAE?

On Tuesday, March 22, 2016 at 5:42:33 PM UTC-7, Richard wrote:
>
> I use to store fr uft8 and didn't have any issue with 2.13.4
>
> Richard
>
> On Tue, Mar 22, 2016 at 8:33 PM, > wrote:
>
>> It could possibly be something specific to GAE.  As I said, I don't have 
>> time for a lot of tests right now.  Try uploading this in a database 
>> somewhere:  テスト
>>
>> On Tuesday, March 22, 2016 at 5:29:02 PM UTC-7, Richard wrote:
>>>
>>> All my functional tests had passed just fine...
>>>
>>> Richard
>>>
>>> On Tue, Mar 22, 2016 at 8:15 PM,  wrote:
>>>
 Guess I could have posted here first, but it's not an error in the new 
 version, it's in multiple versions:

 Unicode is not working in "string" DB entries.  WTF mate?  
 https://groups.google.com/forum/#!topic/web2py/T5eQExgTP1w



 On Tuesday, March 22, 2016 at 4:19:15 PM UTC-7, Dave S wrote:
>
> Never mind, this one is fixed by restarting the web2py instance.
>
> /dps
>
>
> On Tuesday, March 22, 2016 at 4:16:11 PM UTC-7, Dave S wrote:
>>
>>
>>
>> On Monday, March 21, 2016 at 3:38:16 PM UTC-7, Massimo Di Pierro 
>> wrote:
>>>
>>> Please help us check it (for testers version)
>>>
>>> http://web2py.com/init/default/download
>>>
>>> and let us know if it does not work with your code. I will be 
>>> released as stable in 2 days. So better check it sooner rather than 
>>> later.
>>>
>>>
>> I'm also seeing a problem with my simplistic routes.py (works in 
>> 2.13.4) 
>>
>> routers = dict(
>> BASE=dict( default_application='uploader'),
>> )
>>
>>
>> The uploader application is okay, the welcome appli (cation is okay, 
>> but the alternate -- stupid.css -- version called welstoop is ending up 
>> in 
>> uploader,
>> even with an explicit a/c/f URL (
>> http://127.0.0.1:8000/welstoop/default/index).
>>
>> Renaming routes.py to old-routes.py fixes the symptoms.
>>
>> /dps
>>
>> -- 
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> 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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/d/optout.


Re: [web2py] Re: web2py 2.14.1 beta

2016-03-22 Thread webmaster
It could possibly be something specific to GAE.  As I said, I don't have 
time for a lot of tests right now.  Try uploading this in a database 
somewhere:  テスト

On Tuesday, March 22, 2016 at 5:29:02 PM UTC-7, Richard wrote:
>
> All my functional tests had passed just fine...
>
> Richard
>
> On Tue, Mar 22, 2016 at 8:15 PM, > wrote:
>
>> Guess I could have posted here first, but it's not an error in the new 
>> version, it's in multiple versions:
>>
>> Unicode is not working in "string" DB entries.  WTF mate?  
>> https://groups.google.com/forum/#!topic/web2py/T5eQExgTP1w
>>
>>
>>
>> On Tuesday, March 22, 2016 at 4:19:15 PM UTC-7, Dave S wrote:
>>>
>>> Never mind, this one is fixed by restarting the web2py instance.
>>>
>>> /dps
>>>
>>>
>>> On Tuesday, March 22, 2016 at 4:16:11 PM UTC-7, Dave S wrote:



 On Monday, March 21, 2016 at 3:38:16 PM UTC-7, Massimo Di Pierro wrote:
>
> Please help us check it (for testers version)
>
> http://web2py.com/init/default/download
>
> and let us know if it does not work with your code. I will be released 
> as stable in 2 days. So better check it sooner rather than later.
>
>
 I'm also seeing a problem with my simplistic routes.py (works in 
 2.13.4) 

 routers = dict(
 BASE=dict( default_application='uploader'),
 )


 The uploader application is okay, the welcome appli (cation is okay, 
 but the alternate -- stupid.css -- version called welstoop is ending up in 
 uploader,
 even with an explicit a/c/f URL (
 http://127.0.0.1:8000/welstoop/default/index).

 Renaming routes.py to old-routes.py fixes the symptoms.

 /dps

 -- 
>> 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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/d/optout.


[web2py] Re: web2py 2.14.1 beta

2016-03-22 Thread webmaster
Guess I could have posted here first, but it's not an error in the new 
version, it's in multiple versions:

Unicode is not working in "string" DB entries.  WTF mate? 
 https://groups.google.com/forum/#!topic/web2py/T5eQExgTP1w



On Tuesday, March 22, 2016 at 4:19:15 PM UTC-7, Dave S wrote:
>
> Never mind, this one is fixed by restarting the web2py instance.
>
> /dps
>
>
> On Tuesday, March 22, 2016 at 4:16:11 PM UTC-7, Dave S wrote:
>>
>>
>>
>> On Monday, March 21, 2016 at 3:38:16 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> Please help us check it (for testers version)
>>>
>>> http://web2py.com/init/default/download
>>>
>>> and let us know if it does not work with your code. I will be released 
>>> as stable in 2 days. So better check it sooner rather than later.
>>>
>>>
>> I'm also seeing a problem with my simplistic routes.py (works in 2.13.4) 
>>
>> routers = dict(
>> BASE=dict( default_application='uploader'),
>> )
>>
>>
>> The uploader application is okay, the welcome appli (cation is okay, but 
>> the alternate -- stupid.css -- version called welstoop is ending up in 
>> uploader,
>> even with an explicit a/c/f URL (
>> http://127.0.0.1:8000/welstoop/default/index).
>>
>> Renaming routes.py to old-routes.py fixes the symptoms.
>>
>> /dps
>>
>>

-- 
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/d/optout.


[web2py] MASSIVE PyDAL Issue!!! Unicode not working in a "string" type DB entry... ಠ_ಠ

2016-03-22 Thread webmaster
You think this is a game?

So...  I just ran into another UNFATHOMABLY, INCONCEIVABLY MASSIVE BUG in 
the newer PyDAL (i.e. 2.13.4 AND 2.14.1b vs my trusted 2.12.2 version).  It 
doesn't remember how to write unicode to the DB now:

ERROR2016-03-22 23:04:47,468 restricted.py:174] Traceback (most recent 
call last):

...

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 
129-132: ordinal not in range(256)

It's trying to add Japanese characters to my DB in a row defined simply as 
'string'.  Worked fine in 2.12.2...  

Let me be clear, this was using 2.13.4 cloned from the git repo just a few 
days ago.  I then tried the latest 2.14.1b version with identical failure. 
 Then swapped in my trusted 2.12.2 /pydal directory and everything works 
fine again.

Quit messing with my emotions!  Time for another version upgrade!!!  

(And maybe someone can write a test for DAL that confirms it accepts 
unicode before anything is committed to master?  That's a pretty low-level 
test, right there...  I was amazed when I found Cloud SQL broken 
(admittedly only on the homepage version of the source (not that it's good 
to have variation in SAME-VERSION code)), but this makes me worry about the 
framework at a very basic level.  I mean, I got the impression Web2py was 
big in Europe, where ASCII is not the standard.)

DISCLAIMER:  Normally I would make a new test app to confirm it's not 
something in my code, but I'm trying to code features, not debug 
frameworks,  and since 2.12.2's PyDAL works fine, I'm able to defeat my OCD 
and talk shit without being absolutely 100% certain I've properly 
identified the problem.  I apologize if I've made some mistake and am 
getting worked up over nothing.

-- 
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/d/optout.


[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-21 Thread webmaster
Cool beans.  Look forward to giving it a whirl.

On Monday, March 21, 2016 at 3:29:48 PM UTC-7, Massimo Di Pierro wrote:
>
> we will post a new stable version tomorrow I think.
>
> On Monday, 21 March 2016 00:41:15 UTC-5, webm...@trytha.com  
> wrote:
>>
>> From the git repo, yes.  From the current source files on web2py.com, no.
>>
>> On Sunday, March 20, 2016 at 10:22:20 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> So can you confirm the latest pydal works for you?
>>>
>>> On Saturday, 19 March 2016 16:57:11 UTC-5, webm...@trytha.com wrote:

 And thus we discover the true problem.  Try using pydal from 
 http://www.web2py.com/examples/static/web2py_src.zip (the link from 
 Source Code for Normal Users).  -result:  Failure

 Now try the pydal from 
 http://web2py.com/examples/static/2.12.2/web2py_src.zip -result: 
  Success

 Now try the pydal from 
 http://web2py.com/examples/static/2.13.3/web2py_src.zip (apparently 
 the latest one accessible by specific version number) -result:  Failure

 So. I hate you so much right now.  Give me back my two days!

 There needs to be a way to mark your own answer as the "best answer"...


 On Saturday, March 19, 2016 at 1:09:16 PM UTC-7, Massimo Di Pierro 
 wrote:
>
> I tested this. I am using trunk code with latest github and I cannot 
> reproduce. I am pretty sure this is fixed. Make sure you have the latest 
> pydal.
>
> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com wrote:
>>
>> Steps to replicate (3 mins):
>>
>>
>>1. Load Web2py from source off website.  Copy gaehandler.py and 
>>app.yaml to /web2py.  
>>2. In applications/welcome/models/db.py, change the DAL 
>>connection to "db = 
>> DAL('google:sql://[$project]:[$instance]/[$database]')"
>>3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
>>--mysql_port=3306 --mysql_user=root --mysql_password= 
>>/home/www-data/web2py
>>4. Load, then refresh the Welcome app and it crashes because it 
>>thinks it can't access the /databases folder.
>>
>> Solution (1 min):
>>
>>1. Delete /gluon/packages/dal/pydal
>>2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of 
>>web2py.  (http://web2py.com/examples/static/2.12.2/web2py_src.zip)
>>
>> Am I doing something really crazy?  How has nobody run across this in 
>> the six months it's been broken?  Seems like kind of a massive bug.
>>
>

-- 
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/d/optout.


[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-20 Thread webmaster
>From the git repo, yes.  From the current source files on web2py.com, no.

On Sunday, March 20, 2016 at 10:22:20 PM UTC-7, Massimo Di Pierro wrote:
>
> So can you confirm the latest pydal works for you?
>
> On Saturday, 19 March 2016 16:57:11 UTC-5, webm...@trytha.com 
>  wrote:
>>
>> And thus we discover the true problem.  Try using pydal from 
>> http://www.web2py.com/examples/static/web2py_src.zip (the link from 
>> Source Code for Normal Users).  -result:  Failure
>>
>> Now try the pydal from 
>> http://web2py.com/examples/static/2.12.2/web2py_src.zip -result:  Success
>>
>> Now try the pydal from 
>> http://web2py.com/examples/static/2.13.3/web2py_src.zip (apparently the 
>> latest one accessible by specific version number) -result:  Failure
>>
>> So. I hate you so much right now.  Give me back my two days!
>>
>> There needs to be a way to mark your own answer as the "best answer"...
>>
>>
>> On Saturday, March 19, 2016 at 1:09:16 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> I tested this. I am using trunk code with latest github and I cannot 
>>> reproduce. I am pretty sure this is fixed. Make sure you have the latest 
>>> pydal.
>>>
>>> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com wrote:

 Steps to replicate (3 mins):


1. Load Web2py from source off website.  Copy gaehandler.py and 
app.yaml to /web2py.  
2. In applications/welcome/models/db.py, change the DAL connection 
to "db = DAL('google:sql://[$project]:[$instance]/[$database]')"
3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
--mysql_port=3306 --mysql_user=root --mysql_password= 
/home/www-data/web2py
4. Load, then refresh the Welcome app and it crashes because it 
thinks it can't access the /databases folder.

 Solution (1 min):

1. Delete /gluon/packages/dal/pydal
2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of 
web2py.  (http://web2py.com/examples/static/2.12.2/web2py_src.zip)

 Am I doing something really crazy?  How has nobody run across this in 
 the six months it's been broken?  Seems like kind of a massive bug.

>>>

-- 
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/d/optout.


[web2py] Re: Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread webmaster
I started on PythonAnywhere and it is an excellent service.  I learned a 
lot and they are extremely helpful.  And you don't need to put that much 
thought into worrying about your host, as your app is extremely portable. 
 GAE definitely has more moving parts, but Google is putting a LOT of 
effort into it.  Give it another year and I bet it'll be a lot more 
accessible.

You might want to make a simple TO DO list app or something before you dive 
into your main project so you get an idea of how best to design your 
databases and their interactions.  And as I mentioned before, read the 
book, learn the book, love the book:  http://www.web2py.com/book

Good luck!

On Saturday, March 19, 2016 at 9:04:23 PM UTC-7, John Gall wrote:
>
> Thank you for your suggestion!
>
> I'd classify myself as an intermediate in Python, but I have zero 
> experience with Web Dev or Network programming. I had actually never heard 
> of Google App Engine, and I only just found out about PythonAnywhere from 
> going through the introductory tutorials on the website. I think this is 
> the way to go to fulfill my needs and cut down on development time. I'm 
> leaning towards PythonAnywhere at the moment since looking at Google App 
> Engine, it has a lot of moving parts and I'd rather not inundate myself 
> with that at this early stage of network/web programming. It may be 
> something I look into in the future.
>
> I'll check out the other technologies you listed too. I have to admit I'm 
> a little excited at the doors that were just opened by examining what 
> PythonAnywhere can do for me, and I'm going to dive in and start tinkering 
> with a few things right now.
>
> On Saturday, March 19, 2016 at 6:26:12 PM UTC-4, webm...@trytha.com wrote:
>>
>> Everything you mentioned seems easy enough with Web2py.  Do you have any 
>> experience in web development or with Python?  Web2py could definitely do 
>> everything you want, but there are other options as well depending on if 
>> you have experience with anything specific.  I find Python to be the most 
>> intuitive language (in a broad sense), so even if you don't have 
>> experience, this might be a good place for you to start.
>>
>> Web2py comes bundled with a bunch of functionality that should really 
>> benefit your project, but I highly recommend reading the book before 
>> starting anything (I know it can be a lot all at once, but a quick, light 
>> reading will help immensely with finding answers to any future problems).  
>> http://www.web2py.com/book
>>
>> As for additional software, how granular do you mean?  You'll need to 
>> deploy to some sort of server.  The best two options are PythonAnywhere or 
>> Google App Engine.  GAE is intimidating at first, but has some significant 
>> benefits (massive scalability, almost zero DB upkeep), whereas 
>> PythonAnywhere is a good, free way to get started just to see if you're 
>> really going to enjoy Web2py.
>>
>> Web2py comes with bootstrap, but I find that to be cumbersome and poorly 
>> designed (styles should be fully defined in CSS, not in HTML (col-md-6 is a 
>> style element, not a class)).  I prefer using the lightweight Jeet (with 
>> Rupture) and Axis (though Axis buttons can lose some styling on iOS 
>> devices).  I also use Jade to make HTML look much more pleasant (it also 
>> forces you to follow good programming habits in HTML).
>>
>> If you want even more granular, Atom is the best software for where 
>> you're actually going to be spending your time.  Some people will argue 
>> differently, but it's only because they haven't tried it or have some 
>> extremely esoteric way of doing things that they learned from an old 
>> system.  Atom is open source and EXTREMELY customizable.  I have 25 add-ons 
>> for it that make it a coding beast.
>>
>> I've got a script I wrote for myself to get Web2py 99% functioning on GAE 
>> with an Ubuntu VM dev environment from a fresh OSX install if that would 
>> help you.  It's a bit raw (doesn't actually run yet, I just use it for 
>> reference), but I could post it if it would help.
>>
>> On Saturday, March 19, 2016 at 12:22:55 PM UTC-7, John Gall wrote:
>>>
>>> Hello!
>>>
>>> I'm starting a new project I plan to work on over the next six months, 
>>> and I originally planned to use web2py in conjunction with other frameworks 
>>> to accomplish my goal. I've been told that this project is not possible 
>>> with web2py, and I wanted to get an opinion from someone who has worked 
>>> with it before I look into switching technologies. Here is my original post 
>>> from Reddit detailing the scope of my project, and my original question:
>>>
>>>
>>> I'm in the early phase of a project I hope to spend the next six months 
 working on and I'm trying to find some guidance on what technologies and 
 frameworks I should look into in order to accomplish my goal. To start, 
 I'm 
 an intermediate level Python programmer, but I have no experience working 
 with network

[web2py] Using MySQL in GAE locally (is it actually possible?)

2016-03-19 Thread webmaster
I've got MySQL working locally in GAE, but since GAE doesn't write to the 
file system, it can't touch /databases.  Am I doing something wrong?  Has 
anyone actually gotten GAE working with MySQL locally?  I can't find a 
single tutorial related to this.  If someone shows me this last step, I can 
put together a tutorial from fresh OSX install to fully-functional web dev 
environment with web2py on GAE in a Virtualbox VM (a tutorial web2py 
desperately needs).  I already have all the steps in an Evernote, just need 
to figure this last part out.

I even tried putting "folder='/home/www-data/web2py...'" in my DAL 
connection string, but nothing gets written in the /databases folder still. 
 GAE does all the MySQL creation and then hits me with a corrupted *.table 
error the first time I refresh because nothing is written in /databases.

Can I write the databases to memcache or datastore somehow?  How is GAE 
handling this on the server side without errors?

-- 
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/d/optout.


[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread webmaster
As penance, you can tell me how to store images in the datastore while 
using Cloud SQL for everything else (I haven't seen any actual examples of 
using both at the same time, but the book says it can be done).

On Saturday, March 19, 2016 at 2:57:11 PM UTC-7, webm...@trytha.com wrote:
>
> And thus we discover the true problem.  Try using pydal from 
> http://www.web2py.com/examples/static/web2py_src.zip (the link from 
> Source Code for Normal Users).  -result:  Failure
>
> Now try the pydal from 
> http://web2py.com/examples/static/2.12.2/web2py_src.zip -result:  Success
>
> Now try the pydal from 
> http://web2py.com/examples/static/2.13.3/web2py_src.zip (apparently the 
> latest one accessible by specific version number) -result:  Failure
>
> So. I hate you so much right now.  Give me back my two days!
>
> There needs to be a way to mark your own answer as the "best answer"...
>
>
> On Saturday, March 19, 2016 at 1:09:16 PM UTC-7, Massimo Di Pierro wrote:
>>
>> I tested this. I am using trunk code with latest github and I cannot 
>> reproduce. I am pretty sure this is fixed. Make sure you have the latest 
>> pydal.
>>
>> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com wrote:
>>>
>>> Steps to replicate (3 mins):
>>>
>>>
>>>1. Load Web2py from source off website.  Copy gaehandler.py and 
>>>app.yaml to /web2py.  
>>>2. In applications/welcome/models/db.py, change the DAL connection 
>>>to "db = DAL('google:sql://[$project]:[$instance]/[$database]')"
>>>3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
>>>--mysql_port=3306 --mysql_user=root --mysql_password= 
>>>/home/www-data/web2py
>>>4. Load, then refresh the Welcome app and it crashes because it 
>>>thinks it can't access the /databases folder.
>>>
>>> Solution (1 min):
>>>
>>>1. Delete /gluon/packages/dal/pydal
>>>2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of 
>>>web2py.  (http://web2py.com/examples/static/2.12.2/web2py_src.zip)
>>>
>>> Am I doing something really crazy?  How has nobody run across this in 
>>> the six months it's been broken?  Seems like kind of a massive bug.
>>>
>>

-- 
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/d/optout.


[web2py] Re: Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread webmaster
Everything you mentioned seems easy enough with Web2py.  Do you have any 
experience in web development or with Python?  Web2py could definitely do 
everything you want, but there are other options as well depending on if 
you have experience with anything specific.  I find Python to be the most 
intuitive language (in a broad sense), so even if you don't have 
experience, this might be a good place for you to start.

Web2py comes bundled with a bunch of functionality that should really 
benefit your project, but I highly recommend reading the book before 
starting anything (I know it can be a lot all at once, but a quick, light 
reading will help immensely with finding answers to any future problems). 
 http://www.web2py.com/book

As for additional software, how granular do you mean?  You'll need to 
deploy to some sort of server.  The best two options are PythonAnywhere or 
Google App Engine.  GAE is intimidating at first, but has some significant 
benefits (massive scalability, almost zero DB upkeep), whereas 
PythonAnywhere is a good, free way to get started just to see if you're 
really going to enjoy Web2py.

Web2py comes with bootstrap, but I find that to be cumbersome and poorly 
designed (styles should be fully defined in CSS, not in HTML (col-md-6 is a 
style element, not a class)).  I prefer using the lightweight Jeet (with 
Rupture) and Axis (though Axis buttons can lose some styling on iOS 
devices).  I also use Jade to make HTML look much more pleasant (it also 
forces you to follow good programming habits in HTML).

If you want even more granular, Atom is the best software for where you're 
actually going to be spending your time.  Some people will argue 
differently, but it's only because they haven't tried it or have some 
extremely esoteric way of doing things that they learned from an old 
system.  Atom is open source and EXTREMELY customizable.  I have 25 add-ons 
for it that make it a coding beast.

I've got a script I wrote for myself to get Web2py 99% functioning on GAE 
with an Ubuntu VM dev environment from a fresh OSX install if that would 
help you.  It's a bit raw (doesn't actually run yet, I just use it for 
reference), but I could post it if it would help.

On Saturday, March 19, 2016 at 12:22:55 PM UTC-7, John Gall wrote:
>
> Hello!
>
> I'm starting a new project I plan to work on over the next six months, and 
> I originally planned to use web2py in conjunction with other frameworks to 
> accomplish my goal. I've been told that this project is not possible with 
> web2py, and I wanted to get an opinion from someone who has worked with it 
> before I look into switching technologies. Here is my original post from 
> Reddit detailing the scope of my project, and my original question:
>
>
> I'm in the early phase of a project I hope to spend the next six months 
>> working on and I'm trying to find some guidance on what technologies and 
>> frameworks I should look into in order to accomplish my goal. To start, I'm 
>> an intermediate level Python programmer, but I have no experience working 
>> with networked applications, nor do I have any experience with web 
>> development. I'll be working on this project with one other person who has 
>> a lot of experience with using web2py, so that'll be the web framework 
>> we'll be using unless we have a very compelling reason to use something 
>> else like Django. That said, I expect to be doing a large majority of the 
>> work, so I would like to be familiar with all aspects of this program.
>>
>> The project I'm working on is a Table-top gaming aid that I can use to 
>> manage a game session for a custom built gaming system.
>>
>>
>> Here's a brief list of the requirements I'm looking to implement:
>>
>>- 
>>
>>The project is for personal use and won't be something that is 
>>publicly available. Thus, security isn't a major concern, and I will only 
>>require what is necessary to protect an application of this scope.
>>- 
>>
>>Ideally, this program should be deployed via web. I need a deployment 
>>method that is the most accessible. Most of the players will have access 
>> to 
>>a Smartphone or tablet and I considered making it a mobile app, but I 
>> think 
>>a web app would also accomplish the goals of the project and would be 
>>simpler.
>>- 
>>
>>There should be an authentication process in place so that there are 
>>options available for the individual running the game, and each of the 
>>players can only view characters that belong to them.
>>- 
>>
>>All of the players and the host will connect to the same session.
>>- 
>>
>>Everything is turn based. Players will need to be notified when it is 
>>their turn so that they can take actions, and may only take actions when 
>> it 
>>is their turn.
>>- 
>>
>>Enemies will be loaded from a database. Player actions will reference 
>>their character's stats and their ene

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread webmaster
And thus we discover the true problem.  Try using pydal 
from http://www.web2py.com/examples/static/web2py_src.zip (the link from 
Source Code for Normal Users).  -result:  Failure

Now try the pydal 
from http://web2py.com/examples/static/2.12.2/web2py_src.zip -result: 
 Success

Now try the pydal from 
http://web2py.com/examples/static/2.13.3/web2py_src.zip (apparently the 
latest one accessible by specific version number) -result:  Failure

So. I hate you so much right now.  Give me back my two days!

There needs to be a way to mark your own answer as the "best answer"...


On Saturday, March 19, 2016 at 1:09:16 PM UTC-7, Massimo Di Pierro wrote:
>
> I tested this. I am using trunk code with latest github and I cannot 
> reproduce. I am pretty sure this is fixed. Make sure you have the latest 
> pydal.
>
> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com  
> wrote:
>>
>> Steps to replicate (3 mins):
>>
>>
>>1. Load Web2py from source off website.  Copy gaehandler.py and 
>>app.yaml to /web2py.  
>>2. In applications/welcome/models/db.py, change the DAL connection to 
>>"db = DAL('google:sql://[$project]:[$instance]/[$database]')"
>>3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
>>--mysql_port=3306 --mysql_user=root --mysql_password= 
>>/home/www-data/web2py
>>4. Load, then refresh the Welcome app and it crashes because it 
>>thinks it can't access the /databases folder.
>>
>> Solution (1 min):
>>
>>1. Delete /gluon/packages/dal/pydal
>>2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of 
>>web2py.  (http://web2py.com/examples/static/2.12.2/web2py_src.zip)
>>
>> Am I doing something really crazy?  How has nobody run across this in the 
>> six months it's been broken?  Seems like kind of a massive bug.
>>
>

-- 
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/d/optout.


[web2py] Re: URL parsing in controller

2016-03-19 Thread webmaster
Maybe something about "args=request.args(2,5)"?

You could try to test this:

args=[request.args(2),request.args(5)]





On Friday, March 18, 2016 at 1:01:51 PM UTC-7, Jeff Riley wrote:
>
> Hello All,
>
> I am pulling my hair out.  I am trying to redirect the view button on a 
> smartgrid.  I can get the button to redirect to the view I want, but I 
> cannot parse the URL correctly to get the correct sheet id.
>
> Here is my controller
>
> @auth.requires_membership('manager')
> def manage_customers():
> if 'new' in request.args:
> if request.args(2) == 'customer':
> redirect(URL('new_customer'))
> elif request.args(4) == 'sheet':
> redirect(URL('new_sheet', args=request.args(2)))
> if 'edit' in request.args:
> if request.args(4) == 'sheet':
> redirect(URL('edit_sheet', args=request.args(2)))
> if 'view' in request.args:
> if request.args(4) == 'sheet':
> redirect(URL('view_sheet', args=request.args(2,5)))
> elif request.args(6) == 'sheet_archive':
> redirect(URL('view_sheet', args=request.args(7)))
> form = SQLFORM.smartgrid(db.customer, linked_tables=['address', 
> 'sheet', 'sheet_archive'],
>  searchable= dict(customer=True, 
> address=False, sheet=False),
>  editable= dict(customer=True, address=True, 
> sheet=True, sheet_archive=False),
>  deletable= dict(customer=True, address=True, 
> sheet=True, sheet_archive=False),
>  create=dict(customer=True, address=True, 
> sheet=True, sheet_archive=False),
>  paginate=20, maxtextlength=60, 
> fields=[db.customer.first_name,
>  db.customer.last_name, db.customer.phone, 
> db.customer.email, db.customer.handed,
>  db.address.address1, db.address.address2, 
> db.address.city, db.address.state_province,
>  db.address.postal_code, db.sheet.title, 
> db.sheet.created_by, db.sheet.created_on,
>  db.sheet_archive.id, db.sheet_archive.title, 
> db.sheet_archive.created_by,
>  db.sheet_archive.created_on],)
> return dict(form=form, request=request)
>
> Here is my URL:
>
>
> http://127.0.0.1:8000/manage_customers/customer/sheet.customer_id/1/edit/sheet/2?_signature=3b4a45778f06aec42421ef503cba968cd633269a
>
>
> I can only get the customer_id and not the sheet #2.  So I am always 
> displaying the first customer record and the first sheet record.  SO LOST.
>
>

-- 
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/d/optout.


[web2py] Re: Using MySQL in GAE locally (is it actually possible?)

2016-03-19 Thread webmaster
Ok, I went into the web2py_filesystem file that's being created in MySQL by 
GAE.  It shows a bunch of these .table files, but web2py (when run on local 
GAE) is still searching for the folders in the OS's filesystem.  Is this 
just a bug?

On Thursday, March 17, 2016 at 12:59:59 PM UTC-7, webm...@trytha.com wrote:
>
> I've got MySQL working locally in GAE, but since GAE doesn't write to the 
> file system, it can't touch /databases.  Am I doing something wrong?  Has 
> anyone actually gotten GAE working with MySQL locally?  I can't find a 
> single tutorial related to this.  If someone shows me this last step, I can 
> put together a tutorial from fresh OSX install to fully-functional web dev 
> environment with web2py on GAE in a Virtualbox VM (a tutorial web2py 
> desperately needs).  I already have all the steps in an Evernote, just need 
> to figure this last part out.
>
> I even tried putting "folder='/home/www-data/web2py...'" in my DAL 
> connection string, but nothing gets written in the /databases folder still. 
>  GAE does all the MySQL creation and then hits me with a corrupted *.table 
> error the first time I refresh because nothing is written in /databases.
>
> Can I write the databases to memcache or datastore somehow?  How is GAE 
> handling this on the server side without errors?
>

-- 
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/d/optout.


[web2py] Re: web2pyslices unsuable

2016-03-19 Thread webmaster
As a temporary fix while figuring this out, Google has cached pretty much 
every slice.  Just do a google search in the style "site:web2pyslices.com" 
and the tack on whatever search terms you want, then click the little green 
down arrow on Google's search results for the cached version of the site.

On Thursday, March 17, 2016 at 9:04:45 AM UTC-7, zendevel wrote:
>
> Web2pyslices is down and all the content is missing. Is there any owner of 
> the site? It seems like it was hacked or something.  It was been a wealth 
> of knowledge for the community I hate to see it go to pot. I would be 
> willing to host it if needed.
>

-- 
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/d/optout.


[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread webmaster
No rush for me.  I'm satisfied with my temporary fix since I can finally 
get back to actual coding.  Thanks for making such a pleasant framework.

On Saturday, March 19, 2016 at 12:25:02 AM UTC-7, Massimo Di Pierro wrote:
>
> I will get to the bottom of this tomorrow. It is a promise.
>
> On Friday, 18 March 2016 17:42:34 UTC-5, webm...@trytha.com  
> wrote:
>>
>> 2.12.2 is definitely not broken, since that's what I've been using live 
>> on GAE for about six months.  (www.trytha.com)
>>
>> I did the precise steps I outline above while I was preparing the post. 
>>  Not much to it, and it started working again as soon as I replaced the new 
>> /pydal with the old.  I've been beating my head against this for two days. 
>>  I thought it was just a problem I was having deploying locally since I had 
>> gotten things working on GAE last year (I had skipped a *local* GAE 
>> deployment at that time).  This morning I decided to just try my known, 
>> server-side-working app (2.12.2) locally and it worked with no issues. 
>>  That's when I started swapping out directories until I found the offender 
>> was /pydal.  I also tested 2.12.3 and it does *NOT* work.
>>
>> I would really love to be using the latest version.  Hopefully if it's a 
>> mistake on my end, you might have some insight into where I've stepped off 
>> the path.
>>
>> On Friday, March 18, 2016 at 3:28:15 PM UTC-7, Massimo Di Pierro wrote:
>>>
>>> gae on 2.12.2 was broken. It is no broken in current stable and trunk.
>>>
>>> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com wrote:

 Steps to replicate (3 mins):


1. Load Web2py from source off website.  Copy gaehandler.py and 
app.yaml to /web2py.  
2. In applications/welcome/models/db.py, change the DAL connection 
to "db = DAL('google:sql://[$project]:[$instance]/[$database]')"
3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
--mysql_port=3306 --mysql_user=root --mysql_password= 
/home/www-data/web2py
4. Load, then refresh the Welcome app and it crashes because it 
thinks it can't access the /databases folder.

 Solution (1 min):

1. Delete /gluon/packages/dal/pydal
2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of 
web2py.  (http://web2py.com/examples/static/2.12.2/web2py_src.zip)

 Am I doing something really crazy?  How has nobody run across this in 
 the six months it's been broken?  Seems like kind of a massive bug.

>>>

-- 
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/d/optout.


[web2py] How can GAE write to the /databases file?? (I know it can't, but what's the workaround?)

2016-03-19 Thread webmaster
So I've got everything running fine locally on a fresh version of my app, 
load it up in dev_appserver.py and it looks fine.  Then I refresh, and now 
GAE can't find any *.table files in /databases.  Because there aren't any, 
since GAE doesn't write to the FS.  So how do I get around this?

-- 
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/d/optout.


[web2py] Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-18 Thread webmaster
Steps to replicate (3 mins):


   1. Load Web2py from source off website.  Copy gaehandler.py and app.yaml 
   to /web2py.  
   2. In applications/welcome/models/db.py, change the DAL connection to 
   "db = DAL('google:sql://[$project]:[$instance]/[$database]')"
   3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
   --mysql_port=3306 --mysql_user=root --mysql_password= 
   /home/www-data/web2py
   4. Load, then refresh the Welcome app and it crashes because it thinks 
   it can't access the /databases folder.

Solution (1 min):
   
   1. Delete /gluon/packages/dal/pydal
   2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of web2py. 
(http://web2py.com/examples/static/2.12.2/web2py_src.zip)

Am I doing something really crazy?  How has nobody run across this in the 
six months it's been broken?  Seems like kind of a massive bug.

-- 
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/d/optout.


[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-18 Thread webmaster
2.12.2 is definitely not broken, since that's what I've been using live on 
GAE for about six months.  (www.trytha.com)

I did the precise steps I outline above while I was preparing the post. 
 Not much to it, and it started working again as soon as I replaced the new 
/pydal with the old.  I've been beating my head against this for two days. 
 I thought it was just a problem I was having deploying locally since I had 
gotten things working on GAE last year (I had skipped a *local* GAE 
deployment at that time).  This morning I decided to just try my known, 
server-side-working app (2.12.2) locally and it worked with no issues. 
 That's when I started swapping out directories until I found the offender 
was /pydal.  I also tested 2.12.3 and it does *NOT* work.

On Friday, March 18, 2016 at 3:28:15 PM UTC-7, Massimo Di Pierro wrote:
>
> gae on 2.12.2 was broken. It is no broken in current stable and trunk.
>
> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com  
> wrote:
>>
>> Steps to replicate (3 mins):
>>
>>
>>1. Load Web2py from source off website.  Copy gaehandler.py and 
>>app.yaml to /web2py.  
>>2. In applications/welcome/models/db.py, change the DAL connection to 
>>"db = DAL('google:sql://[$project]:[$instance]/[$database]')"
>>3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
>>--mysql_port=3306 --mysql_user=root --mysql_password= 
>>/home/www-data/web2py
>>4. Load, then refresh the Welcome app and it crashes because it 
>>thinks it can't access the /databases folder.
>>
>> Solution (1 min):
>>
>>1. Delete /gluon/packages/dal/pydal
>>2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of 
>>web2py.  (http://web2py.com/examples/static/2.12.2/web2py_src.zip)
>>
>> Am I doing something really crazy?  How has nobody run across this in the 
>> six months it's been broken?  Seems like kind of a massive bug.
>>
>

-- 
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/d/optout.


[web2py] Re: URL parsing in controller

2016-03-18 Thread webmaster
Booya!  I'm still learning web2py/python myself and that felt a lot like 
the type of thing I might have had trouble with.  ;)

Hit the "answered" button so anyone who searches for this in the future 
will see the solution.

On Friday, March 18, 2016 at 5:16:13 PM UTC-7, Jeff Riley wrote:
>
> Thank you all very much.  This worked.  
>
> args=[request.args(2),request.args(5)]
>
>
> On Friday, March 18, 2016 at 5:08:15 PM UTC-5, Jeff Riley wrote:
>>
>> Ah you are totally correct. The controller is default and 
>> manage_customers is the function. I am still getting used to these 
>> constructs.
>
>

-- 
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/d/optout.


[web2py] Re: Using MySQL in GAE locally (is it actually possible?)

2016-03-18 Thread webmaster
I narrowed the problem to pydal.  I could get things to work in web2py 
2.12.2, but in 2.13.4, something has changed which makes GAE no longer work 
for me.  That appears to be the source of my problem.  But web2py is 
supposed to be backwards compatible, so.

Just did a test.  Whatever broke happened on the update to 2.12.3.  I can 
literally install 2.13.4 (latest version), then replace 
gluon/packages/dal/pydal with the pydal folder from 2.12.2 and everything 
works fine.

I don't have anything fancy in my app.  I've only made edits to controllers 
and views (and of course defined my tables and menus in the models).

Can anyone get GAE to work with MySQL in version 2.12.3 or later?

On Thursday, March 17, 2016 at 1:05:42 PM UTC-7, webm...@trytha.com wrote:
>
> Ok, I went into the web2py_filesystem file that's being created in MySQL 
> by GAE.  It shows a bunch of these .table files, but web2py (when run on 
> local GAE) is still searching for the folders in the OS's filesystem.  Is 
> this just a bug?
>
> On Thursday, March 17, 2016 at 12:59:59 PM UTC-7, webm...@trytha.com 
> wrote:
>>
>> I've got MySQL working locally in GAE, but since GAE doesn't write to the 
>> file system, it can't touch /databases.  Am I doing something wrong?  Has 
>> anyone actually gotten GAE working with MySQL locally?  I can't find a 
>> single tutorial related to this.  If someone shows me this last step, I can 
>> put together a tutorial from fresh OSX install to fully-functional web dev 
>> environment with web2py on GAE in a Virtualbox VM (a tutorial web2py 
>> desperately needs).  I already have all the steps in an Evernote, just need 
>> to figure this last part out.
>>
>> I even tried putting "folder='/home/www-data/web2py...'" in my DAL 
>> connection string, but nothing gets written in the /databases folder still. 
>>  GAE does all the MySQL creation and then hits me with a corrupted *.table 
>> error the first time I refresh because nothing is written in /databases.
>>
>> Can I write the databases to memcache or datastore somehow?  How is GAE 
>> handling this on the server side without errors?
>>
>

-- 
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/d/optout.


[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-18 Thread webmaster
All done on an Ubuntu Server 14.04 VM running on an OSX El Capitan host.

On Friday, March 18, 2016 at 3:42:34 PM UTC-7, webm...@trytha.com wrote:
>
> 2.12.2 is definitely not broken, since that's what I've been using live on 
> GAE for about six months.  (www.trytha.com)
>
> I did the precise steps I outline above while I was preparing the post. 
>  Not much to it, and it started working again as soon as I replaced the new 
> /pydal with the old.  I've been beating my head against this for two days. 
>  I thought it was just a problem I was having deploying locally since I had 
> gotten things working on GAE last year (I had skipped a *local* GAE 
> deployment at that time).  This morning I decided to just try my known, 
> server-side-working app (2.12.2) locally and it worked with no issues. 
>  That's when I started swapping out directories until I found the offender 
> was /pydal.  I also tested 2.12.3 and it does *NOT* work.
>
> I would really love to be using the latest version.  Hopefully if it's a 
> mistake on my end, you might have some insight into where I've stepped off 
> the path.
>
> On Friday, March 18, 2016 at 3:28:15 PM UTC-7, Massimo Di Pierro wrote:
>>
>> gae on 2.12.2 was broken. It is no broken in current stable and trunk.
>>
>> On Friday, 18 March 2016 15:55:21 UTC-5, webm...@trytha.com wrote:
>>>
>>> Steps to replicate (3 mins):
>>>
>>>
>>>1. Load Web2py from source off website.  Copy gaehandler.py and 
>>>app.yaml to /web2py.  
>>>2. In applications/welcome/models/db.py, change the DAL connection 
>>>to "db = DAL('google:sql://[$project]:[$instance]/[$database]')"
>>>3. python dev_appserver.py --host=0.0.0.0 --mysql_host=localhost 
>>>--mysql_port=3306 --mysql_user=root --mysql_password= 
>>>/home/www-data/web2py
>>>4. Load, then refresh the Welcome app and it crashes because it 
>>>thinks it can't access the /databases folder.
>>>
>>> Solution (1 min):
>>>
>>>1. Delete /gluon/packages/dal/pydal
>>>2. Replace with /gluon/packages/dal/pydal from version 2.12.2 of 
>>>web2py.  (http://web2py.com/examples/static/2.12.2/web2py_src.zip)
>>>
>>> Am I doing something really crazy?  How has nobody run across this in 
>>> the six months it's been broken?  Seems like kind of a massive bug.
>>>
>>

-- 
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/d/optout.


[web2py] Correct Apache default.conf?

2016-03-15 Thread webmaster
There are a bunch of lovely scripts I've been trying out over on the git 
repository.  Unfortunately, none of them seemed to completely work on a 
fresh Ubuntu Server 14.04 install.  Close, but no cigar on all I tried. 
 After much experimentation (and finally getting things mostly working), I 
found the main lynch pin seems to be the default.conf for the Apache 
server.  Do we not have a definitive version of this file?  Specifically, 
it seems like the  portions have the most variance.

I'm not actually sure *why* there is such variance.  My understanding is 
that Apache is communicating directly with Web2py, so shouldn't all the 
Linux distros have essentially identical versions of default.conf?

-- 
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/d/optout.