Re: [web2py] Re: GAE Task Queue no longer passes payload to web2py function

2019-05-28 Thread Carl Hunter Roach
Thanks Dave. I’m thinking it must be something of that order too. Time to rebuild this project’s yank file. Carl Hunter Roach Bisham Barn Owl Group Middle Thames Conservation Trust Runnymede Ringing Group Founder, Midnight 30 Ltd midnight30.com Makers of Great Careers

[web2py] Re: GAE Task Queue no longer passes payload to web2py function

2019-05-28 Thread Carl Hunter Roach
> That is weird. For the payload of the Google task I'm passing in some json data. I can't see where an fdopen value would be coming from. On Friday, 24 May 2019 21:37:53 UTC+1, Dave S wrote: > > > > On Friday, May 24, 2019 at 3:43:26 AM UTC-7, Carl Hunter Roach wrote: >> >>

[web2py] Re: GAE Task Queue no longer passes payload to web2py function

2019-05-24 Thread Carl Hunter Roach
Thanks for responding dps. Having found the issue arrive with the R-2.15.0b2 release I did try the latest 2.18x line. But that too was broken so I went back to R-2.14.6 But then last week the issue started to occur (I hadn’t pushed any code so this change is hard to explain, to say the least).

Re: [web2py] Re: retrieving json field from db (GAE)

2019-03-04 Thread Carl Hunter Roach
posted to pydal instead. Apologies for that. On Sun, 3 Mar 2019 at 08:09, Massimo Di Pierro wrote: > if we broke this, it was not intentional. Please open a ticket about this > so we can track it. It will be fixed asap > > On Friday, 1 March 2019 04:17:44 UTC-8, Carl Hunter Roach wrote: &

Re: [web2py] Re: update finds previous error in function definition

2019-03-03 Thread Carl Hunter Roach
I've added this as an issue. https://github.com/web2py/web2py/issues/2122 On Sun, 3 Mar 2019 at 08:05, Massimo Di Pierro wrote: > Can you please open a ticket about this? > > On Friday, 1 March 2019 04:07:28 UTC-8, Carl Hunter Roach wrote: >> >> I've been remiss and s

[web2py] Re: json data breaks, via routing, to a web2py controller

2018-11-05 Thread Carl Hunter Roach
loads() up. Probably never will :) On Monday, 5 November 2018 07:04:16 UTC, Dave S wrote: > > > > On Sunday, November 4, 2018 at 5:06:33 AM UTC-8, Carl Hunter Roach wrote: >> >> As suspected, my workaround was to URL encode the "offending" fields at >> the

[web2py] Re: json data breaks, via routing, to a web2py controller

2018-11-04 Thread Carl Hunter Roach
ve tripped over here. On Saturday, 3 November 2018 19:04:20 UTC, Carl Hunter Roach wrote: > > I've had a stable web2py-based service for some years now. > But it broke today with a small change in a data value - that's my working > hypothesis. > > The output of the print sta

[web2py] json data breaks, via routing, to a web2py controller

2018-11-03 Thread Carl Hunter Roach
I've had a stable web2py-based service for some years now. But it broke today with a small change in a data value - that's my working hypothesis. The output of the print statement (see code below): The value of "page_cursor" sent by the caller is "page_cursor" :

[web2py] Re: how to import a package that has deeply nested imports

2017-09-05 Thread Carl Hunter Roach
placing the tlslite directly in applications/appname/modules enables import statements to resolve correctly (just as the manual states! :) I had incorrectly placed it one level lower to group some other files together. On Monday, 4 September 2017 18:28:48 UTC+1, Carl Hunter Roach wrote

[web2py] how to import a package that has deeply nested imports

2017-09-04 Thread Carl Hunter Roach
I'd like to use https://github.com/freshplanet/AppEngine-SocketPool/tree/master/tlslite in a GAE/Web2py project If I place tlslite in my apps `modules` directory I can then add imports such as `from applications.appname.modules.tlslite import ...` but tlslite's python source has many `import`

Re: [web2py] Re: Documenting a file with sphinx, that has local_import in it

2017-08-08 Thread Carl Hunter Roach
e reasons you mention... About request and other web2py > environnement objects maybe you can work something base on this workaround > related to IDE : > > > http://web2py.com/books/default/chapter/29/14/other-recipes#Using-general-purpose-IDEs-with-web2py > > On Tue, Aug

Re: [web2py] Re: Documenting a file with sphinx, that has local_import in it

2017-08-08 Thread Carl Hunter Roach
ps, Sphinx-support has a way to go? On Tue, 8 Aug 2017 at 16:51 Richard Vézina <ml.richard.vez...@gmail.com> wrote: > I think web2py is sphinx compliant now, I recall that Simone (Niphold) had > refactor docstring to do so... To be confirmed... > > Richard > > On Tue, Aug 8, 2

[web2py] Re: Documenting a file with sphinx, that has local_import in it

2017-08-08 Thread Carl Hunter Roach
Is this still the recommended workaround to get Sphinx to generate documentation for projects built upon Web2py? On Saturday, 28 May 2011 16:18:42 UTC+1, Massimo Di Pierro wrote: > > controllers and models in web2py are written in python but are not > python modules. They use objects >

Re: [web2py] Re: Caught out by python/web2py syntax

2017-05-16 Thread Carl Hunter Roach
Sorry about the term "crash". "hang" is more accurate. No ticket is issued and the function db.point.insert does not return although an entry is made into my GAE data store. The the following code works without hanging: for a_point in points: db.point.insert(**as_point) I also

[web2py] Caught out by python/web2py syntax

2017-05-16 Thread Carl Hunter Roach
I had (something like) the following code: In db.py a table called "point" In a controller: # points is a list of dicts defining rows in table point for point in points: db.point.insert(**point) The code would disappear inside db.point.insert without throwing an exception.

[web2py] How do I make a Web2py threadsafe for GAE?

2017-02-15 Thread Carl Hunter Roach
In my app.yaml file I have: api_version: 1 runtime: python27 threadsafe: true handlers: - url: /_ah/warmup script: applications/myapp/mycontroller/warmup in mycontroller: def warmup(): ''' called by GAE to ready a Jupiter instance '''

[web2py] Re: advice for a GAE warmup function

2017-02-14 Thread Carl Hunter Roach
a typo! GAE (Google App Engine) warmup as document here https://cloud.google.com/appengine/docs/python/warmup-requests/ in a platform-agnostic way. On Thursday, 9 February 2017 14:16:32 UTC, Carl Hunter Roach wrote: > > > Anyone with advice on what to put in a GAW warmup() function

[web2py] advice for a GAE warmup function

2017-02-09 Thread Carl Hunter Roach
Anyone with advice on what to put in a GAW warmup() function (https://cloud.google.com/appengine/docs/python/warmup-requests/configuring) Is there a minimum for a DAL-based Web2py application? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] appropriate to ask for a log call to be removed?

2017-02-07 Thread Carl Hunter Roach
In \gluon\packages\dal\pydal\adapters\google_adapters.py there is a single log output that writes out a number without a context string. More of a debug aid meant to be removed. 554 self.db.logger.info(str(counter)) Is this file part of Web2py or imported, untouched, from another project?

Re: [web2py] Re: how to access the message parameter of a raise HTTP?

2017-01-19 Thread Carl Hunter Roach
com> wrote: > On Thursday, January 19, 2017 at 4:32:51 AM UTC-5, Carl Hunter Roach wrote: > > thanks. > > I don't like adding UI Text to URLs as it's too easy for 3rd-parties to > generate URls and have your site serve anything they like :) > > > Note, this is an *internal

Re: [web2py] Re: how to access the message parameter of a raise HTTP?

2017-01-19 Thread Carl Hunter Roach
:26:10 AM UTC-5, Carl Hunter Roach > wrote: > > To routes.py I have: > > routes_onerror = [ > ('*/400', '/app/controller/error_handler') > ] > > So for a raise HTTP(400, "Explanation Text") > > and from error_handler() I can get request.vars.code (400

[web2py] how to access the message parameter of a raise HTTP?

2017-01-18 Thread Carl Hunter Roach
To routes.py I have: routes_onerror = [ ('*/400', '/app/controller/error_handler') ] So for a raise HTTP(400, "Explanation Text") and from error_handler() I can get request.vars.code (400, in this example). How can error_hander() get the text "Explanation Text" ? -- Resources: -

[web2py] How to set-up function to call via URL on a HTTPS GAE Web2py ?

2017-01-10 Thread Carl Hunter Roach
I have a GAE App built with Web2py. I've added a SSL cert to the GAE App. I have URLS like this: https://mydomain/app/controller/function when function is an undecorated function then all is well and I get back some HTML The problem: When function is decorated with `@myservice.json` and

[web2py] Using GCD Stackdriver with a Web2py project

2016-12-13 Thread Carl Hunter Roach
I'm using GCD Stackdriver successfully for an App Engine/Web2py-based app. The only files I can't set breakpoints for are my controllers because Stackdriver can't find a Python module. Would it be recommended to add an __init__.py file to the controllers directory? -- Resources: -

[web2py] For GAE developers. What's missing from a GqlQuery() call?

2016-11-17 Thread Carl Hunter Roach
I have some code running on dev_appserver and on GAE: gqldb.GqlQuery("SELECT DISTINCT acolumnn FROM atable") This used to return values from the database. The database (both locally on GAE) contain appropriate content for acolumn in atable. I think I need entries in index.yaml but

[web2py] Re: web2py under GAE: disabling indexes

2016-09-09 Thread Carl Hunter Roach
Did the "custom_qualifier" patch make it into root? I can see it is used in dal/pydal/adapters/google_adapters.py but with any values passed straight through it's not easy to work out what is/isn't supported. On Sunday, 10 March 2013 02:51:11 UTC, Christian Foster Howes wrote: > > Massimo,

[web2py] Deploying Web2py on AWS Mobile Hub

2016-04-13 Thread Carl Hunter Roach
With AWS Mobile Hub supporting Python and deployment zip files for any libraries has anyone taken this route and have AWS Lambda backed by Web2py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Support for GQL DISTINCT

2015-10-26 Thread Carl Hunter Roach
Google slipped in support for DISTINCT in its GQL SELECT in 2013. Are there any plans to add this to the DAL? Ref: https://cloud.google.com/datastore/docs/apis/gql/gql_reference -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Support for GQL DISTINCT

2015-10-26 Thread Carl Hunter Roach
nyone help? On Monday, 26 October 2015 10:57:53 UTC, Carl Hunter Roach wrote: > > Google slipped in support for DISTINCT in its GQL SELECT in 2013. > > Are there any plans to add this to the DAL? > > Ref: https://cloud.google.com/datastore/docs/apis/gql/gql_reference > -- Resour

[web2py] Re: can validate_and_update_or_insert() be used with Auth on GAE?

2015-10-13 Thread Carl Hunter Roach
field2=user.field2) else: db.auth_user.validate_and_insert( username=user.username, password=user.password, field2=user.field2) On Monday, 12 October 2015 20:08:38 UTC+1, Carl Hunter Roach wrote: > > I'm trying to use val

[web2py] handling None for list:reference

2015-10-13 Thread Carl Hunter Roach
apologies for this question - I see it's been popular over the years - but I can't find the definitive answer. How can I either: a) handle the case of have no references to insert? or b) avoid the duplication of two db inserts that are identical except one is missing a field that can't be set

[web2py] can validate_and_update_or_insert() be used with Auth on GAE?

2015-10-12 Thread Carl Hunter Roach
I'm trying to use validate_and_update_or_insert() to update/insert users into my auth_user table. user = [ Storage(username="u1", password='p1', field2='field2'), Storage(username="u1", password='p1', field2='field2')] for user in users: res =

[web2py] Re: Error in Eclipse kepler for Web2py source: generics.xml

2015-02-05 Thread Carl Hunter Roach
web2py's generic.xml is filled with templating functions that are NOT static xml. On Tuesday, January 13, 2015 at 10:38:00 AM UTC+1, Carl Hunter Roach wrote: In today's Web2py source I get a for the contents of applications/x/views/generic.xml with the default content: {{from

[web2py] Re: Error in Eclipse kepler for Web2py source: generics.xml

2015-01-16 Thread Carl Hunter Roach
is filled with templating functions that are NOT static xml. On Tuesday, January 13, 2015 at 10:38:00 AM UTC+1, Carl Hunter Roach wrote: In today's Web2py source I get a for the contents of applications/x/views/generic.xml with the default content: {{from gluon.serializers import xml

[web2py] Error in Eclipse kepler for Web2py source: generics.xml

2015-01-14 Thread Carl Hunter Roach
In today's Web2py source I get a for the contents of applications/x/views/generic.xml with the default content: {{from gluon.serializers import xml}}{{=XML(xml(response._vars,quote=False))}} The error is: Content is not allowed in prolog This error doesn't prevent the application from working

[web2py] What is the correct parser to use for web2py template HTML files in Eclipse?

2015-01-14 Thread Carl Hunter Roach
Eclipse's standard HTML parser kicks our errors and warnings when validating Web2py HTML template files. e.g., appadmin.html line 66 {{if stopnrows:}}{{=A(T('next %s rows')... The default validator see stopnrows: and expects a closing delimiter. But this is {{embedded}} Python Any tips

[web2py] applications/app/languages

2014-08-05 Thread Carl Hunter Roach
Each file in applications/app/languages has a line: # -*- coding: utf8 -*- I've had to ammend this to: # -*- coding: utf-8 -*- otherwise an exception is thrown in \Python\lib\encodings\utf_8.py (see below). utf-8 is the standard term rather than utf8. My question: does anyone know why all

[web2py] app engine bug? Invalid view reported for app engine but not elsewhere

2014-07-11 Thread Carl Hunter Roach
In my default.py I add a function newview when running locally on 127.0.0.1:8000 all is fine but if I try dev_appserver or GAE then newview runs but on returning my browser displays the error invalid view (default/newview.html) If I add a new html file all runs fine -- Resources: -

[web2py] update_or_insert - handling record created/modified timestamps

2014-07-11 Thread Carl Hunter Roach
I am using Web2py on an appengine project and each of my tables include two 'datetime' fields cDate and mDate to record when the record was created and modified respectively. Last time I used Web2py I'd check if a record existed and call insert() or update_record() appropriately. Now, I can