[web2py] Plugin_jqgrid problem
Hi,everyone, i'm a newbie for web2py,I'm in trouble when I use the plugin_jqgrid. this is my code: my dbmodel: db.define_table("data", SQLField("name", notnull=True, default=None), SQLField("date",notnull=True), SQLField("number", notnull=True, default=None), SQLField("later_times", "integer", default=None), SQLField("leave_early_times", "integer", default=None), SQLField("absenteeism_times", "integer", default=None), SQLField("later_time",default=None), SQLField("leave_early_time", default=None), SQLField("work_time", default=None), SQLField("department",default=None), SQLField("description",default=None)) my controller: def index(): grid=plugin_jqgrid(db.All_work_data,columns=['id','name','date','number','later_times','leave_early_times','absenteeism_times','later_time','leave_early_time','work_time','department','description'],,col_width=75,height=600) return dict(grid=grid) my view: default/index.html {{extend 'layout.html'}} 1.all data {{ =grid}} 2.all data {{ =grid}} I found just one grid display in my page when i run the code. where is the problem?
[web2py] Re: Plugin_jqgrid problem
thank you ,Golden Tiger yes, I'm sure I insert the records. and the first grid can display, 1.all data {{ =grid}} but the second can not! 2.all data {{ =grid}} On May 29, 7:32 am, GoldenTiger wrote: > did you insert any record? > > On 28 mayo, 15:28, leo wrote: > > > > > Hi,everyone, i'm a newbie for web2py,I'm in trouble when I use the > > plugin_jqgrid. this is my code: > > > my dbmodel: > > > db.define_table("data", > > SQLField("name", notnull=True, default=None), > > SQLField("date",notnull=True), > > SQLField("number", notnull=True, default=None), > > SQLField("later_times", "integer", default=None), > > SQLField("leave_early_times", "integer", default=None), > > SQLField("absenteeism_times", "integer", default=None), > > SQLField("later_time",default=None), > > SQLField("leave_early_time", default=None), > > SQLField("work_time", default=None), > > SQLField("department",default=None), > > SQLField("description",default=None)) > > > my controller: > > > def index(): > > > grid=plugin_jqgrid(db.All_work_data,columns=['id','name','date','number','later_times','leave_early_times','absenteeism_times','later_time','leave_early_time','work_time','department','description'],,col_width=75,height=600) > > return dict(grid=grid) > > > my view: > > default/index.html > > > {{extend 'layout.html'}} > > > 1.all data > > {{ =grid}} > > > 2.all data > > {{ =grid}} > > > I found just one grid display in my page when i run the code. > > where is the problem?- Hide quoted text - > > - Show quoted text -
[web2py] cron ignores PYTHONPATH
Hi, I am running web2py 1.88.2. I have some modules I import that are not under the application's directory. These are moduled developed for other projects. Accessing the modules works fine within the app itself, since they are on the PYTHONPATH. However, running the following cron command: @reboot username **default/function I get an ImportError: ImportError: No module named mymodule. Is this by design? Is there a workaround? Thanks, Leo.
[web2py:27412] Re: invalid table name: auth_user
Massimo ,thanks for your help, It's all fine!!! On Jul 25, 10:24 pm, mdipierro wrote: > A minor problem: > > auth.define_tables() # creates all needed tables > > should go after > > auth_table= db.define_table(auth.settings.table_user_name, ) > > Massimo > > On Jul 25, 9:04 am, zenghua wrote: > > > > > Hi,everyone: > > I am a new to web2py,today,I type these code in my "db.py" : > > > --- > > from gluon.tools import * > > auth=Auth(globals(),db) # authentication/authorization > > auth.define_tables() # creates all needed tables > > crud=Crud(globals(),db) # for CRUD helpers using auth > > service=Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc > > > auth_table= db.define_table(auth.settings.table_user_name, > > Field('name',length=128,default='',label='用户名',requires=IS_NOT_EMPTY > > (error_message="用户名不能为空")), > > Field('email',length=128,default='',label='EMAIL',requires=[IS_EMAIL(error_ > > message > > ='不合法的地址'), > > IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]), > > Field('password','password',readable=False,label='密码',requires=CRYPT()), > > Field('registration_key',length=128,default='',writable=False,readable=Fals > > e)) > > auth_table = auth.settings.table_user > > -- > > when I run it and check my label,it show me some error: > > > Error traceback > > > Traceback (most recent call last): > > File "gluon/restricted.py", line 176, in restricted > > File > > "D:/book/python/web2py/web2py1.65/applications/myblog2/models/db.py", > > line 41, in > > File "gluon/sql.py", line 992, in define_table > > SyntaxError: invalid table name: auth_user > > > the error line(41): > > Field('registration_key',length=128,default='',writable=False,readable=Fals > > e)) > > > something mistake I've done? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py:35222] Strange file upload behaviour with https
I run into some weirdness when submitting a form that contains a file upload field. I am using the auto-generated form in the appadmin page that inserts new records into a database table with an upload field. File sizes over a certain limit (not very large, only around 100kb) make the upload last disproportionally longer after clicking the 'submit' button (i.e., 99kb uploads almost instantaneously; 100kb lasts for several seconds), and then the browser comes back with a completely blank page (no ticket, no error message, nothing), and no database insert has actually taken place. This strangeness occurs only when connecting using https (server started with the -c server.crt -k server.key arguments). With an ordinary http connection everything works fine with any upload file size. I have been able to nail it down to an exact file size that still uploads correctly; add one byte to it, and it hangs. It seems to have something to do with the total POST size being sent to the server, because when I add one more character to one of the other fields in the form, I have to reduce the file size by one byte to make it work. Has anyone run into a phenomenon like this in the past? Best wishes, Leo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py:35257] Re: Strange file upload behaviour with https
Understood. Grazie mille, Massimo. And thanks for the excellent framework. I have been working with it only for a few days now, and it promises to be a huge time-saver. Leo On Nov 13, 1:46 am, mdipierro wrote: > This is a limitation of the wsgiserver that comes with web2py. In a > production environment if you use apache+mod_wsgi you will not have > this problem. > > On Nov 12, 9:45 pm, leo wrote: > > > I run into some weirdness when submitting a form that contains a file > > upload field. I am using the auto-generated form in the appadmin page > > that inserts new records into a database table with an upload field. > > > File sizes over a certain limit (not very large, only around 100kb) > > make the upload last disproportionally longer after clicking the > > 'submit' button (i.e., 99kb uploads almost instantaneously; 100kb > > lasts for several seconds), and then the browser comes back with a > > completely blank page (no ticket, no error message, nothing), and no > > database insert has actually taken place. > > > This strangeness occurs only when connecting using https (server > > started with the -c server.crt -k server.key arguments). With an > > ordinary http connection everything works fine with any upload file > > size. > > > I have been able to nail it down to an exact file size that still > > uploads correctly; add one byte to it, and it hangs. It seems to have > > something to do with the total POST size being sent to the server, > > because when I add one more character to one of the other fields in > > the form, I have to reduce the file size by one byte to make it work. > > > Has anyone run into a phenomenon like this in the past? > > > Best wishes, > > Leo > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py] embedded server gives broken chunks?
Using Python 2.5.4 and web2py 1.84.4, I call a function decorated with @service.run from python using robj = urllib2.urlopen(urllib2.Request(url,data)) robj.read() The .read() call fails with the following exception: ... File "socket.pyc", line 304, in read File "httplib.pyc", line 509, in read File "httplib.pyc", line 548, in _read_chunked ValueError: invalid literal for int() with base 16: '' Searching the internet I found that this seems to be a reported issue with httplib: http://bugs.python.org/issue7013. It is not really a bug -- httplib is doing the right thing, but many servers out there, including the one on which bing runs, seem to be missing a 0 for the last chunk. Is the server used in the guts of web2py doing the wrong thing and returning a chunk missing the 0 size? Thanks, Leo.
[web2py] Re: The stability of web2py releases
Hi Folks, I just read the entire thread... uff. I am a member of the Technical Leaderhip Council at Coin-OR (www.coin- or.org). We went through these arguments a while back improductively several times until we made it a priority to resolve them. We are sure glad we did. We have over 50 projects in diverse areas of Analytics, some with very enthusiastic innovative project managers and some with very conservative codebases sponsored by IBM. Our users are just as diverse (as is the case with web2py). Here is what has worked for us (it is not that different from many other projects): 1) Stable means feature-stable, not necessarily crash-stable. They take numbering schemes like X.Y 2) Releases use minor points derived from stable numbers, e.g. X.Y.z. All releases must pass their unittests. Unfortunately many projects have incomplete unittests, but that is another issue. Releases have bug-fixes only. 3) Trunk is trunk. Use at your own risk. That is where the latest and greatest lives. 4) Each project has a ticket system for patches and bug reports. The +: * Users knows where the project stands. They know what they are getting from their downlads and naturally segment into the appropriate groups. * PMs can more easily coordinate developers. The -: * It is often difficult to get PMs to do stables and releases. Sometimes it takes a dedicated non-core developer who really wants a feature to do it for them. Personally I think a ticket system for web2py linked to from the "Support" tab would be a great first enhancement (I added it to the voices app). Cheers, Leo. On Dec 30, 5:55 am, appydev wrote: > I totally agree with Jonathan Lundell, > > I think the changes he proposes, would provide stability web2py, and I'm > sure will appeal to users (both new and existing). > > My humble opinion is that the way they attack the bugs, is one of the > weaknesses ofweb2py, I think it is > messy and I'm sure many have decided not to use web2py for it. > > 2010/12/22 Jonathan Lundell > > > On Dec 22, 2010, at 7:47 AM, Branko Vukelić wrote: > > > > 2010/12/22 Luis Díaz : > > > >> in particular whenever new versions come out ... I always say ... have > > >> to wait 1 week or 2 to becomestable ... > > > > Not "become stable", but "be proven stable". You release, wait for > > > everyone to give it a go. If everyone is happy, then it's considered > > > stable, and move to stable box on the downloads page. If someone > > > complains, it stays in unstable indefinitely, and a new release is > > > made fixing the bugs. > > > The problem is that "become stable" is in conflict with "add new features", > > and the new release that fixes the bugs also gets new (and buggy) features. > > > Linux has a similar problem, that gets addressed a couple of ways. One is > > that we have Linux distributions independent of (and lagging) the core > > kernel releases: Red Hat, Ubuntu, etc. The other, somewhat more recent, is > > that certain kernel releases are maintained by the core kernel developers as > > stable points. > > > The web2py equivalent would be something like this. Massimo releases > > 1.91.1, and we (for some "we") decide that that's a good feature/stability > > set for a stable release point. We then create a stable branch, and somebody > > (for some "somebody"--this is the catch) back-ports bug fixes to the stable > > branch, so we have 1.91.1.1, 1.91.1.2, etc, with *only* confirmed bug fixes, > > no new features, being back-ported. Meanwhile, trunk development proceeds > > with 1.91, 1.93, etc. > > > Problem is, maintaining stable branches requires real work, and in this > > environment it means volunteer work. > >
[web2py] Re: Plugin_jqgrid problem
> Hi,everyone, i'm a newbie for web2py,I'm in trouble when I use the > plugin_jqgrid. this is my code: > > my dbmodel: > > db.define_table("data", > SQLField("name", notnull=True, default=None), > SQLField("date",notnull=True), > SQLField("number", notnull=True, default=None), > SQLField("later_times", "integer", default=None), > SQLField("leave_early_times", "integer", default=None), > SQLField("absenteeism_times", "integer", default=None), > SQLField("later_time",default=None), > SQLField("leave_early_time", default=None), > SQLField("work_time", default=None), > SQLField("department",default=None), > SQLField("description",default=None)) > > > my controller: > > def index(): > > > > grid=plugin_jqgrid(db.data,columns=['id','name','date','number','later_times','leave_early_times','absenteeism_times','later_time','leave_early_time','work_time','department','description'],,col_width=75,height=600) >return dict(grid=grid) > > > > my view: > default/index.html > > {{extend 'layout.html'}} > > 1.all data > {{ =grid}} > > 2.all data > {{ =grid}} > > > I found just one grid display in my page when i run the code. > where is the problem? > >
[web2py] Web2py on google app engine (show INVALID REQUEST)
Hi, I was testing web2py on google app engine, follow the first steps in this site [1], but I did not sucess. My web2py, same in localhost show the message: Invalid Request when I try the link admin and that other: web2py/applications/welcome/controllers/default.py. Somebody have any ideia how fix this? http://wiki.web2py.com/Deploying_web2py_on_Google_App_Engine_GAE_
Re: [web2py] Re: Web2py on google app engine (show INVALID REQUEST)
Thanks Massimo, But, Why the app example oes not work either? It'll be for the same reason? On Mon, Sep 6, 2010 at 10:14 AM, mdipierro wrote: > I am not sure anybody is maintaining that wiki any longer. Here is the > most updated information about running on GAE > > http://web2py.com/book/default/chapter/11#Google-App-Engine > > there are other good tutorials online. > > admin - by default - is not deployed on GAE because it does not work > (since GAE does allow writing on filesystem) > and therefore "invalid request" is to be expected. > > On Sep 5, 11:09 pm, "leo (kirotawa)" wrote: > > Hi, > > > > I was testing web2py on google app engine, follow the first steps in > > this site [1], but I did not sucess. My web2py, same in localhost show > > the message: Invalid Request when I try the link admin and that > > other: web2py/applications/welcome/controllers/default.py. Somebody > > have any ideia how fix this? > > > > http://wiki.web2py.com/Deploying_web2py_on_Google_App_Engine_GAE_ > -- Leônidas S. Barbosa (Kirotawa) [DesenvolvedorWeb/CEFET/RN] [Ciências da Computação/UFRN] [pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN [Estudante de japonês nível Intermediário I - Japanese Student] [Desenvolvedor em python, PyGame] blog nerd: corecode.wordpress.com/ blog music: essenaomanja.blogspot.com blog tirinhas: elminiche.wordpress.com/ "Mais sábio é aquele que sabe que não sabe" (Sócrates) 日本語の学生です。 コンピュータサイエンスの学位.
Re: [web2py] Re: Web2py on google app engine (show INVALID REQUEST)
Ok, thanks so much Massimo. On Mon, Sep 6, 2010 at 12:24 PM, mdipierro wrote: > By default admin/examples and welcome are not deployed on gae to save > space. You can change this by editing app.yaml > > On Sep 6, 9:49 am, leo kirotawa wrote: > > Thanks Massimo, > > But, Why the app example oes not work either? It'll be for the same > > reason? > > > > > > > > On Mon, Sep 6, 2010 at 10:14 AM, mdipierro > wrote: > > > I am not sure anybody is maintaining that wiki any longer. Here is the > > > most updated information about running on GAE > > > > >http://web2py.com/book/default/chapter/11#Google-App-Engine > > > > > there are other good tutorials online. > > > > > admin - by default - is not deployed on GAE because it does not work > > > (since GAE does allow writing on filesystem) > > > and therefore "invalid request" is to be expected. > > > > > On Sep 5, 11:09 pm, "leo (kirotawa)" wrote: > > > > Hi, > > > > > > I was testing web2py on google app engine, follow the first steps > in > > > > this site [1], but I did not sucess. My web2py, same in localhost > show > > > > the message: Invalid Request when I try the link admin and that > > > > other: web2py/applications/welcome/controllers/default.py. Somebody > > > > have any ideia how fix this? > > > > > >http://wiki.web2py.com/Deploying_web2py_on_Google_App_Engine_GAE_ > > > > -- > > Leônidas S. Barbosa (Kirotawa) > > [DesenvolvedorWeb/CEFET/RN] > > [Ciências da Computação/UFRN] > > [pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN > > [Estudante de japonês nível Intermediário I - Japanese Student] > > [Desenvolvedor em python, PyGame] > > blog nerd: corecode.wordpress.com/ > > blog music: essenaomanja.blogspot.com > > blog tirinhas: elminiche.wordpress.com/ > > > > "Mais sábio é aquele que sabe que não sabe" (Sócrates) > > > > 日本語の学生です。 > > コンピュータサイエンスの学位. > -- Leônidas S. Barbosa (Kirotawa) [DesenvolvedorWeb/CEFET/RN] [Ciências da Computação/UFRN] [pós-graduando em Inteligência Computacional/Processamento Gráfico /UFRN [Estudante de japonês nível Intermediário I - Japanese Student] [Desenvolvedor em python, PyGame] blog nerd: corecode.wordpress.com/ blog music: essenaomanja.blogspot.com blog tirinhas: elminiche.wordpress.com/ "Mais sábio é aquele que sabe que não sabe" (Sócrates) 日本語の学生です。 コンピュータサイエンスの学位.
[web2py] crossdomain.xml file on GAE
Hi there, I'm doing a application in GAE with web2py and need put the crossdomain.xml file in top of application. I searcherd in net and found the old threadh talk about this, so I did a modification in routes.py file to this > ('.*:/crossdomain.xml', '/init/static/ crossdomain.xml'),, but when I try get or see the crossdomain fiile in GAE it return a Invalid request, and in my localhost it run fine. Somebody knows how solve this?
[web2py] Re: crossdomain.xml file on GAE
Ops, I did! I just modified my yaml file adding this url: /crossdomain.xml static_files: applications/init/static/crossdomain.xml upload: applications/init/static/crossdomain.xml Now it work fine []'s On 15 set, 14:03, "leo (kirotawa)" wrote: > Hi there, > > I'm doing a application in GAE with web2py and need put the > crossdomain.xml file in top of application. I searcherd in net and > found the old threadh talk about this, so I did a modification in > routes.py file to this > ('.*:/crossdomain.xml', '/init/static/ > crossdomain.xml'),, > > but when I try get or see the crossdomain fiile in GAE it return a > Invalid request, and in my localhost it run fine. Somebody knows how > solve this?
[web2py] SyntaxError: Set: no tables selected - Web2py on GAE , DATABASE ERROR
Hi, I'm try deploy my web2py application in GAE, but it return this exception : raceback (most recent call last): File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ applications/init/controllers/api.py:teste", line 94, in File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ gluon/globals.py", line 96, in self._caller = lambda f: f() File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ applications/init/controllers/api.py:teste", line 84, in teste File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ gluon/contrib/gql.py", line 736, in select (items, tablename, fields) = self._select(*fields, **attributes) File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ gluon/contrib/gql.py", line 676, in _select (tablename, tableobj) = self._get_table_or_raise() File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ gluon/contrib/gql.py", line 653, in _get_table_or_raise raise SyntaxError, 'Set: no tables selected' SyntaxError: Set: no tables selected So, in localhost all works fine, but in GAE it return this. how i see,it is as if the tables had not been created. Someboy have any ideia to fixed this?
[web2py] Re: SyntaxError: Set: no tables selected - Web2py on GAE , DATABASE ERROR
No, I try insert in the table and after select the content but it raise up the same exception. I created a service insert, put the content, it's work fine, but in the of select it show a error message. On 18 set, 13:19, mdipierro wrote: > This may be to the facts that on GAE tables are not created until you > insert a record in them. > > On Sep 18, 10:55 am, "leo (kirotawa)" wrote: > > > > > > > > > Hi, > > > I'm try deploy my web2py application in GAE, but it return this > > exception : > > > raceback (most recent call last): > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/restricted.py", line 188, in restricted > > exec ccode in environment > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > applications/init/controllers/api.py:teste", line 94, in > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/globals.py", line 96, in > > self._caller = lambda f: f() > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > applications/init/controllers/api.py:teste", line 84, in teste > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/contrib/gql.py", line 736, in select > > (items, tablename, fields) = self._select(*fields, **attributes) > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/contrib/gql.py", line 676, in _select > > (tablename, tableobj) = self._get_table_or_raise() > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/contrib/gql.py", line 653, in _get_table_or_raise > > raise SyntaxError, 'Set: no tables selected' > > SyntaxError: Set: no tables selected > > > So, in localhost all works fine, but in GAE it return this. how i > > see,it is as if the tables had not been created. Someboy have any > > ideia to fixed this?
[web2py] Re: SyntaxError: Set: no tables selected - Web2py on GAE , DATABASE ERROR
I saw here, and the table was create in GAE with insert service, but when I get a select service its fails. On 18 set, 13:19, mdipierro wrote: > This may be to the facts that on GAE tables are not created until you > insert a record in them. > > On Sep 18, 10:55 am, "leo (kirotawa)" wrote: > > > > > > > > > Hi, > > > I'm try deploy my web2py application in GAE, but it return this > > exception : > > > raceback (most recent call last): > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/restricted.py", line 188, in restricted > > exec ccode in environment > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > applications/init/controllers/api.py:teste", line 94, in > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/globals.py", line 96, in > > self._caller = lambda f: f() > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > applications/init/controllers/api.py:teste", line 84, in teste > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/contrib/gql.py", line 736, in select > > (items, tablename, fields) = self._select(*fields, **attributes) > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/contrib/gql.py", line 676, in _select > > (tablename, tableobj) = self._get_table_or_raise() > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > gluon/contrib/gql.py", line 653, in _get_table_or_raise > > raise SyntaxError, 'Set: no tables selected' > > SyntaxError: Set: no tables selected > > > So, in localhost all works fine, but in GAE it return this. how i > > see,it is as if the tables had not been created. Someboy have any > > ideia to fixed this?
[web2py] Re: SyntaxError: Set: no tables selected - Web2py on GAE , DATABASE ERROR
Hi again, seem now it work fine, was like you tell me Massimo. Thanks a lot for all help ;] On 18 set, 14:20, "leo (kirotawa)" wrote: > I saw here, and the table was create in GAE with insert service, but > when I get a select service its fails. > > On 18 set, 13:19, mdipierro wrote: > > > > > > > > > This may be to the facts that on GAE tables are not created until you > > insert a record in them. > > > On Sep 18, 10:55 am, "leo (kirotawa)" wrote: > > > > Hi, > > > > I'm try deploy my web2py application in GAE, but it return this > > > exception : > > > > raceback (most recent call last): > > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > > gluon/restricted.py", line 188, in restricted > > > exec ccode in environment > > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > > applications/init/controllers/api.py:teste", line 94, in > > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > > gluon/globals.py", line 96, in > > > self._caller = lambda f: f() > > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > > applications/init/controllers/api.py:teste", line 84, in teste > > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > > gluon/contrib/gql.py", line 736, in select > > > (items, tablename, fields) = self._select(*fields, **attributes) > > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > > gluon/contrib/gql.py", line 676, in _select > > > (tablename, tableobj) = self._get_table_or_raise() > > > File "/home/kirotawa/Documentos/Programacao/Web/Gappengine/web2py/ > > > gluon/contrib/gql.py", line 653, in _get_table_or_raise > > > raise SyntaxError, 'Set: no tables selected' > > > SyntaxError: Set: no tables selected > > > > So, in localhost all works fine, but in GAE it return this. how i > > > see,it is as if the tables had not been created. Someboy have any > > > ideia to fixed this?
[web2py:18728] unsubscriptable?
Hello all, I'm a new guy whit web2py, I have some problem when I Learn web2py! my controller code: def basic(): response.menu[['civilized',False,URL(r=request,f='civilized')], ['slick',False,URL(r=request,f='slick')], ['basic',True,URL(r=request,f='basic')]] response.flash='Now, you clicked base!!!' return dict(message='Now,you clicked on base!!') my Views: {{extend 'layout.html'}} {{ =message}} {{for i in range(10):}} it is a test {{pass}} I seem very well, but I got some errors when I run it: File "/home/leo/workspace/web2py/applications/exercise/controllers/layout_examples.py" <http://127.0.0.1:8000/admin/default/edit/exercise/controllers/layout_examples.py>, line 25, in basic ['basic',True,URL(r=request,f='basic')]] TypeError: 'NoneType' object is unsubscriptable Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---
[web2py] Strange behavior in web2py 1.89
Hi there, When I installed the plugin, layouts, and tried to get it, my web2py stay in infinite loop,and overloaded my processor. I talked to another user and he had the same problem but with another plugin, so the problem is in web2py 1.89. Is this not a serious bug? []'s
[web2py] Re: Strange behavior in web2py 1.89
plugin: web2py.plugin.layouts python 2.6.2 SO: ubuntu 9.04 On Dec 3, 7:24 pm, mdipierro wrote: > Which plugins? Which python version? Which os? > > On Dec 3, 4:06 pm, "leo (kirotawa)" wrote: > > > > > > > > > Hi there, > > > When I installed the plugin, layouts, and tried to get it, my web2py > > stay in infinite loop,and overloaded my processor. > > I talked to another user and he had the same problem but with another > > plugin, so the problem is in web2py 1.89. Is this not a serious bug? > > > []'s
[web2py] Re: Strange behavior in web2py 1.89
And my friend in web2py list BR, with this plugin: jqgrid. On Dec 3, 7:35 pm, "leo (kirotawa)" wrote: > plugin: web2py.plugin.layouts > python 2.6.2 > SO: ubuntu 9.04 > > On Dec 3, 7:24 pm, mdipierro wrote: > > > > > > > > > Which plugins? Which python version? Which os? > > > On Dec 3, 4:06 pm, "leo (kirotawa)" wrote: > > > > Hi there, > > > > When I installed the plugin, layouts, and tried to get it, my web2py > > > stay in infinite loop,and overloaded my processor. > > > I talked to another user and he had the same problem but with another > > > plugin, so the problem is in web2py 1.89. Is this not a serious bug? > > > > []'s
[web2py] Web2py 'exceptions.SyntaxError' "No fields to update" on heroku sometimes when login with facebook
Hello, I am using Web2py on the Heroku servers with the gunicorn server (also tried rocket) and using the helloFacebook example made by Michele Comitini ( https://code.google.com/r/michelecomitini-facebookaccess/ ). I have updated with the latest facebookforpython facebook.py file, and doing local_import instead of the global. Short version: At random times, when doing the login the redirects fails with No fields to update If I drop all the databases and restart the server, then it works again (but of course I have no data!!!) Long version: First I had a problem when login, with Oauth2, instead of making a redirection to the actual server, it redirected to my web IP address, weird! I solved changing: gluon/contrib/login_methods/oauth20_account.py 105 r = current.request 106 #http_host = r.env.http_x_forwarded_for #THIS was making a problem getting my laptop address instead of my server address ... WHY?? 107 http_host = r.env.http_host - I've checked the book (The core chapter), manuals and the ref and I don't get why we would use: r.env.http_x_forwarded_for instead of r.env.http_host Any help here? Well, coming back to the main issue: The problem is, everything works great sometimes, database is working, updates, login, etc. This is from the actual production server AND with the local (foreman from heroku) server, both facebook apps running correctly. Server is either gunicorn (but I don't know how to configure the admin password to be available in a file correctly) or either with rocket (which I use for testing and being able to see the admin and the tickets). With both I'm having the same issue. facebookforpython (facebook.py file) is updated to the last version, web2py version is the latest stable. and the virtualenv requirements.txt file now contains: argparse==1.2.1 distribute==0.6.24 gunicorn==0.17.2 psycopg2==2.4.6 requests==1.1.0 wsgiref==0.1.2 For the database I am using postgres from heroku and for the configuration in the db.py file, is with: -- from gluon.contrib.heroku import get_db db = get_db() -- At a certain point (when the server gets restarted, what happens every push or once a day in heroku and every source change in the local) when I try do the login, it fails and gives me the stated error. Here: ( http://pastebin.com/y8bseuAN ) all the info about the Error. Note the trace is taken from the local server, but the info is the same when running on the production server. Questions: Why is the system trying to update the database when logging in with an Oauth system? Why is the system working correctly with a clean database, but a certain point (even if I do not modify at all myself the DB) it breaks? Any hints on how to solve this issue? Best, Leo -- --- 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/groups/opt_out.
[web2py] OT: Why my posts do not appear on the list?
why? -- --- 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/groups/opt_out.
[web2py] 'exceptions.SyntaxError' No fields to update when login on heroku + facebook
Hello, I have a facebook app hosted on heroku working with the lastest stable Web2py. Initially everything works perfect (in local and in production server), but sometimes, when restarting (in case of local on local modifications; and in case of production, either when heroku restarts the server, or on git push heroku master command), sometimes it breaks giving the error: No fields to update Traces here: http://pastebin.com/y8bseuAN When this happens, the only way I have found to make it work again, is to actually reset the db (in local, erasing everything and letting web2py remake it all). This, of course, is not too nice. Details on the system, configurations, etc: Facebook application is taken from example https://code.google.com/r/michelecomitini-facebookaccess/ helloFacebook app facebook.py is updated to the latest version of the https://github.com/pythonforfacebook db is configured with: from gluon.contrib.heroku import get_db db = get_db() virtualenv is configured, requirements.txt file has the following argparse==1.2.1 distribute==0.6.24 gunicorn==0.17.2 psycopg2==2.4.6 requests==1.1.0 wsgiref==0.1.2 I have tried with gunicorn and with rocket servers, configuration Procfiles containing either: web: python anyserver.py -s gunicorn -i 0.0.0.0 -p $PORT or: web: python web2py.py -a mypasswd -i 0.0.0.0 -p $PORT Questions: Why is the system trying to update the DB when doing the login with OAuth? Why it should break when an update is empty, instead of ignoring the error and saying that nothing was done instead? Have you got any clues on how to start solving the issue? I sincerely have no clue about what lead to follow. I am tented to modify the dal.py file and tell it to ignore the error Another thing that I need to state: When first tried to login, the redirect address generated by OAuth was wrong, it gave my local personal IP address, instead of the one in the server (I don't know why), I managed to solve it modifying: gluon/contrib/login_methods/oauth20_account.py -- 105r = current.request 106#http_host = r.env.http_x_forwarded_for #THIS was making a problem getting my laptop address instead of my server address ... WHY??? 107http_host = r.env.http_host -- Reading in the book (chapter The Core) and in the ref. I do not get why we should use env.http_x_forwarded_for instead of env.http_host , Don't we want the server address to be the redirection address? Why would we even want an address that is the client AND can be spoofed? -- --- 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/groups/opt_out.