[web2py] Re: Can't get response.stream() to work

2016-09-14 Thread Joe Barnhart
I solved my problem.

Part of me wants to just leave it at that.  But I come here to teach as 
well as learn, and this is definitely a "teaching moment" for web2py 
developers.

The code I posted before was without error.  The problem occurred because 
it was not the only code in the controller.  Here is the complete example 
from the web page:

def reg_getfile():
from datetime import datetime as dt
from copy import copy
if db(db.download_group).isempty():
init_download_groups_table()
if session.idset:
rset = session.idset
session.idclear = copy(rset)
now = dt.today()
elif request.vars.modified_on:
dbrs, dbre = db.reg_swim, db.reg_edit
rows = 
db((dbre.id_regswim==dbrs.id)&(dbre.modified_on==request.vars.modified_on)).select(dbre.id)
rset = set([r.id for r in rows])
now = dt.strptime(request.vars.modified_on,'%Y-%m-%d %H:%M:%S')
else:
return ''
return _reg_getfile(now, rset)

def _reg_getfile(now,idset):
from regexport import generate_regfile
from cStringIO import StringIO
buf = StringIO()
generate_regfile(idset, buf)
buf.seek(0)
fname = 'reg-%s.sd3'%now.strftime('%y%m%d-%H%M%S')
response.headers['Content-Type']='application/sd3'
response.headers['Content-Disposition']='attachment; filename=%s'%fname
return response.stream(buf)

The second method, _reg_getfile() (with the underscore) is what we poured 
over before.  The problem was that it was not the method called directly by 
the link.  The method reg_getfile() (no underscore) is called first.  It 
examines some vars, does a database lookup for the ids of affected rows, 
and then calls the underscore method.

And here is where the problem lies:

return _reg_getfile(now,rset)

*The code that DOESN'T work lacks the little "return" keyword.*  AGH! 
 I am not an inexperienced Python programmer.  It's not that I'm just 
careless.  It's the kind of stupid little error that can sideline anybody, 
no matter how much code you're written.  It's pernicious because everything 
"seems" to work perfectly.  You can stop it almost anywhere and everything 
looks fine.

So let my stupidity be a cautionary tale.  When something like this happens 
to you, you'll solve it quicker if you make these assumptions:

   1. It's not the fault of the platform.  web2py works just fine.
   2. It's not a bug in Python.  The chances of finding a bug in Python are 
   probably less than being hit by a meteor.  Not because it doesn't have any 
   but because there are so many users that someone else found it already.
   3. If it worked before in any fashion -- WHAT CHANGED?  In my case I 
   split one method into two.
   4. Don't be afraid to step thru the debugger into code you don't know. 
You'll learn more and eventually find your answer.
   5. And last, "always make new mistakes."  I like that one.

Joe

-- 
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: Can't get response.stream() to work

2016-09-14 Thread Anthony
What happens if instead of calling generate_regfile you simply write some 
text directly to the StringIO object? Does it return properly in that case?

Also, how is this code getting called?

Anthony

On Wednesday, September 14, 2016 at 4:52:09 PM UTC-4, Joe Barnhart wrote:
>
> The part that is invisible to me is what happens after the controller does 
> its job and hands the stream off to response.stream().  I've traced it far 
> enough to see that it creates a "wrapped" version of the stream, and the 
> stream is still correct and valid up to that point.
>
> After that, I lose the train of execution.  I have no idea what happens 
> after response.stream() returns the wrapped stream.  It is at this point 
> that rocket or apache2 is invoked to send the stream back to my browser. 
>  In the debugger, I can see that the stream is received by my Safari 
> browser and that it received only 4 bytes, the message "None".  Clearly 
> this is the result of some Python operation that was expected to return a 
> result but didn't.
>
> Does web2py invoke any default handlers or views when streaming back a 
> file?  Is it possible I've borked a file, or a file is missing?  Do any 
> views get in the way at all of streaming?
>
> I know:
>
> A.  The basic capability of streaming works.  It works fine in a previous 
> edition of my site.
>
> B.  Nothing in web2py had changed behaviors.  I went all the way back to 
> 2.8.2 and the response is the same.
>
> C.  The problem is not the stream itself.  Nor in the code that directly 
> hands off the stream.
>
> So we're getting down to the itty bitty probabilities.  My stream is 
> invoked by clicking on a link which in turn invokes a URL().  Obviously 
> that works, but did it preset the response in some way that caused the 
> failure?  My old site worked by creating a FORM()  with one BUTTON() and 
> used "GET" to invoke the same URL.  It worked in the old code, but does not 
> work in the new.
>
> At some point the URL that was created to perform the streaming had the 
> ".load" extension assigned by default, since it came from a (statically 
> loaded) component itself.  I noticed that by looking at the browser for the 
> actual network it downloaded.  I tried ".html" and empty to see if it made 
> a difference.  It did not.
>
> On Wednesday, September 14, 2016 at 6:40:56 AM UTC-7, Massimo Di Pierro 
> wrote:
>>
>> What you have seems correct but we do not get the whole picture from this 
>> code. Sorry.
>>
>>
>>>

-- 
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: how to turn off caching for ajax() function calls.

2016-09-14 Thread Anthony
On Wednesday, September 14, 2016 at 2:41:28 PM UTC-4, Dave S wrote:
>
>
>
> On Wednesday, September 14, 2016 at 11:23:31 AM UTC-7, Anthony wrote:
>>
>> Not sure what you mean by caching. If your Ajax call updates data on the 
>> server but doesn't do anything on the client, then nothing will change on 
>> the page. We'll need to see some code to help.
>>
>> Anthony
>>
>
> May be worth noting that the LOAD() helper wraps the Ajax call in such a 
> way that the DOM contents of the named DIV are replaced.
>

Sounds like he wants to update individual cells in an HTML table. With 
LOAD(), you would have to replace the whole table on each Ajax request, 
which would be an inefficient way to update a single cell.

Anthony

-- 
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: How to get dropdown options working on nav-bar

2016-09-14 Thread Dave S
On Wednesday, September 14, 2016 at 1:00:45 PM UTC-7, Peter wrote:
>
>
> That may be from the Bootstrap2 days.
>>
>
> I put some time in last night trying to understand the how/why and think I 
> have a handle on it, thanks again for the pointers Dave.
>

I'm always happy to help, and sometimes my help works out.  Glad you're in 
good shape now.

/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] Re: Can't get response.stream() to work

2016-09-14 Thread Joe Barnhart
The part that is invisible to me is what happens after the controller does 
its job and hands the stream off to response.stream().  I've traced it far 
enough to see that it creates a "wrapped" version of the stream, and the 
stream is still correct and valid up to that point.

After that, I lose the train of execution.  I have no idea what happens 
after response.stream() returns the wrapped stream.  It is at this point 
that rocket or apache2 is invoked to send the stream back to my browser. 
 In the debugger, I can see that the stream is received by my Safari 
browser and that it received only 4 bytes, the message "None".  Clearly 
this is the result of some Python operation that was expected to return a 
result but didn't.

Does web2py invoke any default handlers or views when streaming back a 
file?  Is it possible I've borked a file, or a file is missing?  Do any 
views get in the way at all of streaming?

I know:

A.  The basic capability of streaming works.  It works fine in a previous 
edition of my site.

B.  Nothing in web2py had changed behaviors.  I went all the way back to 
2.8.2 and the response is the same.

C.  The problem is not the stream itself.  Nor in the code that directly 
hands off the stream.

So we're getting down to the itty bitty probabilities.  My stream is 
invoked by clicking on a link which in turn invokes a URL().  Obviously 
that works, but did it preset the response in some way that caused the 
failure?  My old site worked by creating a FORM()  with one BUTTON() and 
used "GET" to invoke the same URL.  It worked in the old code, but does not 
work in the new.

At some point the URL that was created to perform the streaming had the 
".load" extension assigned by default, since it came from a (statically 
loaded) component itself.  I noticed that by looking at the browser for the 
actual network it downloaded.  I tried ".html" and empty to see if it made 
a difference.  It did not.

On Wednesday, September 14, 2016 at 6:40:56 AM UTC-7, Massimo Di Pierro 
wrote:
>
> What you have seems correct but we do not get the whole picture from this 
> code. Sorry.
>
>
>>

-- 
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: How to get dropdown options working on nav-bar

2016-09-14 Thread Peter


> That may be from the Bootstrap2 days.
>

I put some time in last night trying to understand the how/why and think I 
have a handle on it, thanks again for the pointers Dave.

It may be useful to other noobs so my lessons learned...

I started to develop using an existing Free CSS Template (that is 
apparently from years back).
It was of huge benefit to me in getting started quickly because I could 
largely see much of how it worked and was able to copy the approach for new 
models views and controllers keeping the look and feel consistent.

Then this issue regarding menu dropdowns came up... and sure enough the 
Free CSS Template has its own Oxidation/*.css files 

My 'old' Free css Template is has/uses...

   

   - base.css
   - calendar.css
   - demo_table.css
   - fullcalendar.css
   - jqModal.css
   - Oxidation/base.css
   - Oxidation/calendar.css
   - Oxidation/demo_table.css
   - Oxidation/fullcalendar.css
   - Oxidation/jqModal.css

whereas the latest version of web2py by default has/uses 
   
   - bootstrap.min.css
   - calendar.css
   - web2py-bootstrap3.css
   - web2py.css 

I went a step further and migrated some of my existing MVC code to a new 
clean default web2py app and the menu code worked without change i.e. the 
dropdowns appeared as originally intended/expected.  (lots of other things 
broke though).

For now I will work with what I have but v2 if I ever get there will be a 
migration to a build using the latest defaults in web2py and maybe even 
stupid.css!

Thanks again Dave!








 

-- 
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: how to turn off caching for ajax() function calls.

2016-09-14 Thread Dave S


On Wednesday, September 14, 2016 at 11:23:31 AM UTC-7, Anthony wrote:
>
> Not sure what you mean by caching. If your Ajax call updates data on the 
> server but doesn't do anything on the client, then nothing will change on 
> the page. We'll need to see some code to help.
>
> Anthony
>

May be worth noting that the LOAD() helper wraps the Ajax call in such a 
way that the DOM contents of the named DIV are replaced.

/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] how to turn off caching for ajax() function calls.

2016-09-14 Thread Anthony
Not sure what you mean by caching. If your Ajax call updates data on the server 
but doesn't do anything on the client, then nothing will change on the page. 
We'll need to see some code to help.

Anthony

-- 
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: Which push notification service/solution would you recommend?

2016-09-14 Thread Massimo Di Pierro
I have using the google app engine queues and they work great. I am also 
experimenting with Amazon SQS. Will report back. If anybody has experience 
with them, I would like to know.

On Wednesday, 14 September 2016 08:37:21 UTC-5, Zoltan Vincze wrote:
>
> Hi there!
>
> I'm total new to web development, so pardon the n00b question (and my bad 
> English)!
>
> After working through the video tutorial of Massimo I would like to write 
> a web app using web2py --> web client push notifications.
>
> At first I wanted to use Firebase because I have already been playing with 
> it in the past. I found 3 python helper libraries (
> https://firebase.google.com/docs/database/rest/start) but 2 of them seems 
> not to be maintained any more which is bad because Firebase 3.x has a new 
> API, and the third library does not work with python 2.7.
>
> So I wrestled a bit with the websocket_messaging.py script and got it 
> running on localhost (there is a typo in the script by the way). 
> Unfortunately pythonanywhere.com (where I want to host the app) uses WSGI 
> which does not support the asynchronous functionality of tornado (
> https://help.pythonanywhere.com/pages/UsingTornado/).
>
> I found https://pusher.com which seems to have a maintained python 2.7 
> helper library, but somehow I'm getting desperate. I don't want to waste my 
> time with it before making sure it will work for me.
>
> What is your experience/recommendation? Should I go with 
> pythonanywhere.com + pusher.com or is there a better alternative? The 
> thing is I don't want to manage the infrastructure but "just" use it.
>
> Thanks in advance!
>

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

2016-09-14 Thread Massimo Di Pierro
You can ask here. If we can help for free so that everybody benefit the 
better. If instead you have private code and do not want to show, please 
contact one of the companies doing web2py support listed from the web2py 
page.

On Wednesday, 14 September 2016 08:37:21 UTC-5, Morris Fourie wrote:
>
> I need assistance with Web2py and Solr UI. I am new and not at the right 
> level yet but am willing to pay. I hope I am at the right forum and come 
> anyone help
> Thanks
> Mo
>
>
>
>

-- 
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 interprets function name as property

2016-09-14 Thread Massimo Di Pierro
Can you explain us more about what you are doing? You should not start/stop 
threads from web2py apps.

On Wednesday, 14 September 2016 08:36:51 UTC-5, MarkEdson AtWork wrote:
>
>
> I have a need to stop a thread on the server from web2py.
>
> The thread is running and I've stored the thread id so I can retrieve it 
> when I want to abort.  The abort code will look something like this:
>
> for tid, tobj in threading._active.items():
> if tid == stored_thread_id:
> tobj.abort()
>
> when I try to call the abort() method on the object however I get the 
> following error:
>
>  'bool' object is not callable
> Version
> web2py™ Version 2.14.6-stable+timestamp.2016.05.09.19.18.48
> Python Python 2.7.11: C:\web2py-ve\Scripts\python.exe (prefix: 
> C:\web2py-ve)Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
>
> Traceback (most recent call last):
>   File "C:\web2py-master\web2py\gluon\restricted.py", line 220, in restricted
> exec(ccode, environment)
>   File 
> "C:/web2py-master/web2py/applications/riqburnin/controllers/default.py" 
> , 
> line 539, in 
>   File "C:\web2py-master\web2py\gluon\globals.py", line 405, in 
> self._caller = lambda f: f()
>   File 
> "C:/web2py-master/web2py/applications/riqburnin/controllers/default.py" 
> , 
> line 432, in terminate_vds_DID_dwell
> if thread_id and stop_server_thread(thread_id):
>   File 
> "C:\web2py-master\web2py\applications\riqburnin\modules\common_routines.py", 
> line 51, in stop_server_thread
> tobj.abort()
> TypeError: 'bool' object is not callable
>
>
> How can I call this method without causing the error?
>
>

-- 
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: LOCALS | FL | CT | Senior Salesforce Developer Remote

2016-09-14 Thread Ron Chatterjee
Doesn't mention anything about compensation. 

On Wednesday, September 14, 2016 at 9:36:51 AM UTC-4, Ali Quasim wrote:
>
> Hi,
>
>  
>
>  
>
> · *Role: Senior Salesforce Developer*
>
> · *Location: Remote - but will have to travel to Tampa, FL OR 
> Stamford, CT sites occasionally*
>
> · *Length: 6+ months*
>
> · *Work week: Mon-Fri*
>
> · *Mode of interview: Phone then Skype*
>
>  
>
>  
>
>  
>
> Senior Salesforce Developer, for a 40-hour per week remote position with 
> minimal travel onsite required to our client’s office in either FL or CT.  
> As the Senior Salesforce Developer you will perform hands-on technical 
> implementation, with a focus on delivering functional solutions on the 
> Salesforce.com platform. You will be expected to take a lead role in the 
> design, implementation, deployment and documentation of projects that 
> leverage the Salesforce.com toolset.
>
>  
>
> The position will entail the following duties and responsibilities:
>
> · Serve as the subject matter expert for solution architecture 
> that will include configuration, development, integration and customization 
> of complex environments
>
> · Serve as technical lead for Salesforce projects
>
> · Strong understanding of Salesforce Declarative Programming and 
> Administration (develop code, custom objects, Visual Force pages, Apex, 
> reports, workflows and assignment rules)
>
> · Design and develop solutions primarily on the Salesforce 
> platform using Apex programming language and Visual Force
>
> · Develop software solutions using MS tools, Salesforce.com API 
> framework, and 3rd party APIs 2 Perform unit testing and defect fixes
>
> · Liaise with internal clients and users to understand their 
> business needs in developing solutions through Salesforce
>
> · Ad hoc analysis and projects as needed
>
>  
>
>  
>
> *Required Skills:*
>
> · Bachelor’s degree in Computer Science or related field 4+ 
> years’ of experience working with Salesforce
>
> · One or more Salesforce certifications demonstrating current 
> knowledge as a developer
>
> · Advanced knowledge of Microsoft Office products, particularly 
> Excel
>
> · Solid understanding of web technologies, such as HTTP, 
> JavaScript, AJAX, HTML, DHTML, CSS
>
> · Solid knowledge of SQL and understanding of relational databases
>
> · Proficient in writing clean, solid, readable code
>
> · Experience with at least one object-oriented programming 
> language, such as Java, C#, C++
>
> · Highly accurate with meticulous attention to detail
>
> · Excellent problem solving capabilities
>
> · Strong project manager, capable of juggling multiple projects 
> involving various end users, meet deadlines and proactively communicate 
> status updates
>
> · Demonstrates calm under pressure, is a proactive contributor 
> with an eagerness to learn
>
> · Health Care Industry Experience
>
> · Security and Compliance Experience
>
> · Health Cloud experience a huge plus!
>
> *Ali Quasim | Technical Recruiter| Apetan Consulting LLC*
>
> *Phone: 201-620-9700* ** 142 | Mail: **a...@apetan.com  |*
>
> *Mailing Address:* 72 Van Reipen Avenue pmb#255, Jersey City, NJ 07306
>
> *Corp. Office:*  15 Union Avenue, office # 6, Rutherford, New Jersey 07070
>
> *Web link:  **www.apetan.com *
>

-- 
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: GAE integration is MASSIVELY broken again (in multiple ways in multiple versions)

2016-09-14 Thread Massimo Di Pierro
LOL. I am using it at camio.com we have a lot of internal dashboards based 
on web2py and large number of datasets BUT we bypass web2py Auth because 
have a different mechanism so we did not notice this problem. I will check 
but I often test GAE before posting new versions.

On Tuesday, 13 September 2016 04:47:43 UTC-5, 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] Re: How to code efficiently for multiple database engines with Exceptions

2016-09-14 Thread Massimo Di Pierro
On Mac my advice is to use Anaconda. Their conda package system too is 
great and handles all dependencies correctly.

On Sunday, 11 September 2016 04:40:02 UTC-5, Joe Barnhart wrote:
>
> It's more complicated than that.  There are obsolete versions of some 
> libraries, such as libel, which need to be replaced.  However, those libs 
> are not easily replaced because you can't simply "ln" an entry into the 
> directory where it needs to go.  There are workarounds, and potential 
> problems with the workarounds.  This is all on El Capitan so your milage 
> may vary.
>
> It's just an unholy mess.  I'm really surprised the PostgresSQL and Apple 
> people can't come up with a way around it.  Or the psycopg2 people. 
>  Whoever.
>
> -- Joe
>
>
> On Saturday, September 10, 2016 at 5:14:48 AM UTC-7, Julian Sanchez wrote:
>>
>> Hi Joe,
>>
>> psycopg2 installs on mac (I have it on 3).  'pip install' will fail 
>> because psycopg2 needs the postgresql client libraries already installed. 
>>  If you have homebrew just do a 'brew postgresql' followed by 'pip install 
>> psycopg2'.  It should work.
>>
>> Cheers,
>> Julian
>>
>> On Thursday, September 8, 2016 at 9:43:02 PM UTC-5, Joe Barnhart wrote:
>>>
>>> Hi Massimo --
>>>
>>> Two issues...
>>>
>>> 1.  I use a Mac.  For whatever reason, psycopg2 does not "pip install" 
>>> on a Mac.  I researched it for a day or so -- even AFTER having had it 
>>> WORKING on my system until I "upgraded" to El Capitan and it all quit.  I 
>>> am so done with psycopg2 because its installation is crap.
>>>
>>> 2.  The future belongs to pypy and psycopg2 doesn't work with it. 
>>>  pg8000 does.  There is a psycopg2.cffi but I don't know how mature it is.
>>>
>>> It's all enough to make me want to switch to MySql!
>>>
>>> -- Joe
>>>
>>>
>>> On Wednesday, September 7, 2016 at 5:38:57 PM UTC-7, Massimo Di Pierro 
>>> wrote:

 I strongly recommend you do not use pg8000. We always run into issues 
 with it. 

 pip install psycopg2

 Massimo

>>>  
>>>
>>

-- 
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: Can't get response.stream() to work

2016-09-14 Thread Massimo Di Pierro
What you have seems correct but we do not get the whole picture from this 
code. Sorry.

On Sunday, 11 September 2016 04:52:24 UTC-5, Joe Barnhart wrote:
>
> This MUST be something I'm doing wrong.  I have used this very code -- 
> even this method -- countless times but now it fails to stream the file.   
> The object  being streamed is a StringIO buffer of some file that I create 
> on the fly.  I'm trying to download it with a provided file name and type. 
>  This code has worked in the past, but I've been hammering on my site 
> getting it "updated" and now it streams the word "None" every time.
>
> If I stop and debug the buffer, I can see about 97K worth of text queued 
> up and ready to go.  I've stepped it as far as the Response.stream() method 
> and everything looks perfect.  But when the rubber hits the road, all I get 
> is "None".  Here is the my code:
>
> def _reg_getfile(now,idset):
> from regexport import generate_regfile
> from cStringIO import StringIO
> buf = StringIO()
> generate_regfile(idset, buf)
> buf.seek(0)
> response.headers['Content-Type']='application/sd3'
> response.headers['Content-Disposition']='attachment; 
> filename=reg-%s.sd3'%now.strftime('%y%m%d-%H%M%S')
> return response.stream(buf)
>
> And my response in a file named reg-160911-023542.sd3:
>
> None
>
> Help me prevent baldness here.  Because I'm sure I'm going to tear my hair 
> out over this!
>
> I'm using "Version 2.14.6-stable+timestamp.2016.05.09.19.18.48" and Python 
> 2.7.12 on a Mac under El Capitan (OS X ver. 10.11.6).  I"ve tried Safari, 
> Chrome, and FireFox with the same result.
>
> -- Joe
>
>

-- 
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: Code change in oracle.py to allow joins in pagination.

2016-09-14 Thread Massimo Di Pierro
Thank you for your work. Can you submit a github pull request? If not we 
can do it but you may want to get the credit. Let us know.

On Saturday, 10 September 2016 20:54:18 UTC-5, tomt wrote:
>
> Hello,
>
> I have patched the select_limitby routine in oracle.py to allow for 
> successful pagination when joins are used.
>
> This is an example of the sql it generates:
>
> SELECT c0 "STATUSPOINT.POINTNUMBER", c1 "STATUSPOINT.POINTNAME", c2 
> "AOR.REFERENCENAME", c3 "AOR.AOR"
> FROM (
>   SELECT w_tmp.c0, w_tmp.c1, w_tmp.c2, w_tmp.c3, ROWNUM rn
>   FROM (
> SELECT STATUSPOINT.POINTNUMBER c0, STATUSPOINT.POINTNAME c1, 
> AOR.REFERENCENAME c2, AOR.AOR c3
> FROM AOR, STATUSPOINT
>  WHERE (STATUSPOINT.POINTACCESSAREA = AOR.AOR)
>  ORDER BY STATUSPOINT.POINTNUMBER
>   ) w_tmp
>   WHERE ROWNUM <= 20
> )WHERE rn > 10
>
> The sql I used is based on a suggestion from 
> https://blog.jooq.org/2014/06/09/stop-trying-to-emulate-sql-offset-pagination-with-your-in-house-db-framework/
>
> It works successfully in my initial tests, but I realize that it's 
> possible that this change may cause some problems that I haven't tested for.
>
> I'm hopeful that this change may be considered for implementation into the 
> official web2py code.  Please let me know if there is anything that I can 
> do to assist in this process.
>
>
> ... gluon/packages/dal/pydal/adapters/oracle.py ...
>
> def select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby):
> if limitby:
> (lmin, lmax) = limitby
> if len(sql_w) > 1:
> sql_w_row = sql_w + ' AND w_row > %i' % lmin
> else:
> sql_w_row = 'WHERE w_row > %i' % lmin
>
> # start of my code changes
>
> # remove blanks from sql_f
> mysql_f = sql_f.replace(" ","")
> # split into lists
> myfields = mysql_f.split(",")
> select1 = "SELECT"
> select2 = "SELECT"
> select3 = "SELECT"
> for i in range(len(myfields)):
> select1 += ' c%s "%s",' % (i,myfields[i])
> select2 += ' w_tmp.c%s,' % (i)
> select3 += ' %s c%s,' % (myfields[i],i)
> # remove trailing ','
> select1 = select1.rstrip(",")
> select3 = select3.rstrip(",")
> mysql = "%s\nFROM (\n  %s ROWNUM rn\n  FROM (\n%s" % 
> (select1,select2,select3)  
> mysql += "\nFROM %s\n%s\n%s" % (sql_t,sql_w,sql_o)
> mysql += "\n  ) w_tmp\n  WHERE ROWNUM <= %s\n)WHERE rn > %s\n" % 
> (limitby[1],limitby[0])
> return mysql
> #return  'SELECT %s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM 
> (SELECT %s FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s %s;' % (sql_s, sql_f, 
> sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o)
>
> # end of my code changes
>
> return 'SELECT %s %s FROM %s%s%s;' % (sql_s, sql_f, sql_t, sql_w, 
> sql_o)
>
> .
>
>
>

-- 
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] Web2py Solr UI

2016-09-14 Thread Morris Fourie
I need assistance with Web2py and Solr UI. I am new and not at the right 
level yet but am willing to pay. I hope I am at the right forum and come 
anyone help
Thanks
Mo



-- 
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] LOCALS | FL | CT | Senior Salesforce Developer Remote

2016-09-14 Thread Ali Quasim
Hi,





· *Role: Senior Salesforce Developer*

· *Location: Remote - but will have to travel to Tampa, FL OR
Stamford, CT sites occasionally*

· *Length: 6+ months*

· *Work week: Mon-Fri*

· *Mode of interview: Phone then Skype*







Senior Salesforce Developer, for a 40-hour per week remote position with
minimal travel onsite required to our client’s office in either FL or CT.
As the Senior Salesforce Developer you will perform hands-on technical
implementation, with a focus on delivering functional solutions on the
Salesforce.com platform. You will be expected to take a lead role in the
design, implementation, deployment and documentation of projects that
leverage the Salesforce.com toolset.



The position will entail the following duties and responsibilities:

· Serve as the subject matter expert for solution architecture that
will include configuration, development, integration and customization of
complex environments

· Serve as technical lead for Salesforce projects

· Strong understanding of Salesforce Declarative Programming and
Administration (develop code, custom objects, Visual Force pages, Apex,
reports, workflows and assignment rules)

· Design and develop solutions primarily on the Salesforce platform
using Apex programming language and Visual Force

· Develop software solutions using MS tools, Salesforce.com API
framework, and 3rd party APIs 2 Perform unit testing and defect fixes

· Liaise with internal clients and users to understand their
business needs in developing solutions through Salesforce

· Ad hoc analysis and projects as needed





*Required Skills:*

· Bachelor’s degree in Computer Science or related field 4+ years’
of experience working with Salesforce

· One or more Salesforce certifications demonstrating current
knowledge as a developer

· Advanced knowledge of Microsoft Office products, particularly
Excel

· Solid understanding of web technologies, such as HTTP,
JavaScript, AJAX, HTML, DHTML, CSS

· Solid knowledge of SQL and understanding of relational databases

· Proficient in writing clean, solid, readable code

· Experience with at least one object-oriented programming
language, such as Java, C#, C++

· Highly accurate with meticulous attention to detail

· Excellent problem solving capabilities

· Strong project manager, capable of juggling multiple projects
involving various end users, meet deadlines and proactively communicate
status updates

· Demonstrates calm under pressure, is a proactive contributor with
an eagerness to learn

· Health Care Industry Experience

· Security and Compliance Experience

· Health Cloud experience a huge plus!

*Ali Quasim | Technical Recruiter| Apetan Consulting LLC*

*Phone: 201-620-9700* ** 142 | Mail: **a...@apetan.com  |*

*Mailing Address:* 72 Van Reipen Avenue pmb#255, Jersey City, NJ 07306

*Corp. Office:*  15 Union Avenue, office # 6, Rutherford, New Jersey 07070

*Web link:  **www.apetan.com *

-- 
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 to turn off caching for ajax() function calls.

2016-09-14 Thread MarkEdson AtWork
I am trying to update the val() in table data elements on a page.  The call 
updates the text but the updates do not display in the browser.

If I inspect the element the old text is still there but when I refresh the 
page the new text shows up.  This behaves as though the initial values 
returned by ajax are still present i.e. cached in the page.  How do I turn 
cache off for web2py ajax() function calls?

-- 
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] Which push notification service/solution would you recommend?

2016-09-14 Thread Zoltan Vincze
Hi there!

I'm total new to web development, so pardon the n00b question (and my bad 
English)!

After working through the video tutorial of Massimo I would like to write a 
web app using web2py --> web client push notifications.

At first I wanted to use Firebase because I have already been playing with 
it in the past. I found 3 python helper libraries (
https://firebase.google.com/docs/database/rest/start) but 2 of them seems 
not to be maintained any more which is bad because Firebase 3.x has a new 
API, and the third library does not work with python 2.7.

So I wrestled a bit with the websocket_messaging.py script and got it 
running on localhost (there is a typo in the script by the way). 
Unfortunately pythonanywhere.com (where I want to host the app) uses WSGI 
which does not support the asynchronous functionality of tornado (
https://help.pythonanywhere.com/pages/UsingTornado/).

I found https://pusher.com which seems to have a maintained python 2.7 
helper library, but somehow I'm getting desperate. I don't want to waste my 
time with it before making sure it will work for me.

What is your experience/recommendation? Should I go with pythonanywhere.com 
+ pusher.com or is there a better alternative? The thing is I don't want to 
manage the infrastructure but "just" use it.

Thanks in advance!

-- 
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] web2py interprets function name as property

2016-09-14 Thread MarkEdson AtWork

I have a need to stop a thread on the server from web2py.

The thread is running and I've stored the thread id so I can retrieve it 
when I want to abort.  The abort code will look something like this:

for tid, tobj in threading._active.items():
if tid == stored_thread_id:
tobj.abort()

when I try to call the abort() method on the object however I get the 
following error:

 'bool' object is not callable
Version
web2py™ Version 2.14.6-stable+timestamp.2016.05.09.19.18.48
Python Python 2.7.11: C:\web2py-ve\Scripts\python.exe (prefix: C:\web2py-ve)
Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.

Traceback (most recent call last):
  File "C:\web2py-master\web2py\gluon\restricted.py", line 220, in restricted
exec(ccode, environment)
  File "C:/web2py-master/web2py/applications/riqburnin/controllers/default.py" 
, 
line 539, in 
  File "C:\web2py-master\web2py\gluon\globals.py", line 405, in 
self._caller = lambda f: f()
  File "C:/web2py-master/web2py/applications/riqburnin/controllers/default.py" 
, 
line 432, in terminate_vds_DID_dwell
if thread_id and stop_server_thread(thread_id):
  File 
"C:\web2py-master\web2py\applications\riqburnin\modules\common_routines.py", 
line 51, in stop_server_thread
tobj.abort()
TypeError: 'bool' object is not callable


How can I call this method without causing the error?

-- 
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] Duplicating an app when a client sign up

2016-09-14 Thread Oasis Agano
Greetings
Im trying to setup a multi tenancy kind of app that will copy a web2py app 
to the same location with a different name(the new company's name) when 
that company signs up,
im planning to use shutil as the folder library but im not that experienced 
with python

the code is the following

Controller

import shutil
import os

def join():
form = SQLFORM(db.client).process()
if form.accepted:
response.flash = 'Registration accepted'
redirect(URL('success'))
print form.client

#create folder with the new company's name from the processed form
#copy the content of the working app to the new folder

elif form.errors:
response.flash = 'Verify your Information'
else:
response.flash = 'please fill the form'
return locals()
def success():
return locals()


The Model


db.define_table('client',
Field('name', 'string',label="Organization 
Name",requires=IS_NOT_EMPTY()),
Field('contact_name', 'string', label='Contact 
Name',requires=IS_NOT_EMPTY()),
Field('email', 'string', label='Email',requires=IS_NOT_EMPTY()),
Field('address', 
'text',label='Address',requires=IS_NOT_EMPTY()),
Field('Other', 'text'),

)


Regards

-- 
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: GAE integration is MASSIVELY broken again (in multiple ways in multiple versions)

2016-09-14 Thread Mathieu Clabaut
Indeed, I did my test on a single instance with no scaling in order to
characterise the cost if the service becomes largely used.

You are right, with automatic scaling, the response time is totally
acceptable. The cost is also acceptable as least until the site usage keeps
low...

Le mar. 13 sept. 2016 à 22:50,  a écrit :

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