[web2py] Re: invalid request

2016-05-10 Thread 'Laer Cius' via web2py-users
@Anthony It did not solve the issue but the error message with psycopg2 if far more useful.. It is not the apache server it can't connect with but the postgresql server : it asks in the logs if it is running ? I guess it comes from my 2 interfaces settings : web2py runs on 192.168.0.10 and

[web2py] Re: invalid request

2016-05-10 Thread Anthony
I think there are problems with the pg8000 driver -- you should switch to psycopg2. Anthony On Tuesday, May 10, 2016 at 9:29:30 AM UTC-4, Laer Cius wrote: > > Nonw apache logs show this : > > [Tue May 10 14:35:29.351466 2016] [wsgi:error] [pid 12826]return >

[web2py] Re: invalid request

2016-05-10 Thread 'Laer Cius' via web2py-users
Nonw apache logs show this : [Tue May 10 14:35:29.351466 2016] [wsgi:error] [pid 12826]return self.driver.connect(**driver_args) [Tue May 10 14:35:29.351470 2016] [wsgi:error] [pid 12826] File "/home/user/public_html/machina/gluon/contrib/pg8000/__init__.py", line 336, in connect [Tue May 10

[web2py] Re: invalid request

2016-05-10 Thread 'Laer Cius' via web2py-users
@DenesL Thanks for your help with my brain failure ! I didn't think to try to start without apache.. It did work, after a few tweaks (empty all db+errors folders) and adding request.is_local=True to the admin/access.py I even had my tickets back ! @Anthony Thanks too ! I could verify your say

[web2py] Re: invalid request

2016-05-10 Thread 'Laer Cius' via web2py-users
@DenesL Thanks for your help with my brain failure ! I didn't think to try to start without apache.. It did work, after a few tweaks (empty all db+errors folders) and adding request.is_local=True to the admin/access.py I even had my tickets back ! @Anthony Thanks too ! I could verify your say

[web2py] Re: invalid request

2016-05-10 Thread Anthony
Also, note that Nginx + uWSGI is currently recommended over Apache + mod_wsgi for production deployment. Anthony On Tuesday, May 10, 2016 at 7:54:23 AM UTC-4, Anthony wrote: > > web2py URLs are not served in the same way you would serve static files. > You must configure your web server

[web2py] Re: invalid request

2016-05-10 Thread Anthony
web2py URLs are not served in the same way you would serve static files. You must configure your web server properly to run a Python WSGI application. For Apache, the recommended method is to use mod_wsgi -- see the documentation:

[web2py] Re: invalid request

2016-05-10 Thread 'DenesL' via web2py-users
Have you tried starting web2py without Apache?. You seem to have change IP addresses and ports, they are stored and need to be reset. http://www.web2py.com/books/default/chapter/29/04/the-core#Command-line-options On Tuesday, May 10, 2016 at 6:38:42 AM UTC-4, Laer Cius wrote: > > Hi, > > I know

[web2py] Re: invalid request with a simple view

2014-01-05 Thread Massimo Di Pierro
The purpose of a view is that or converting the output of a controller action (a python function) into HTML. you can have views/default/index.html containing only h1hello world/h1 but you also need a file controllers/default.py containing def index(): return dict() On Sunday, 5 January 2014

[web2py] Re: invalid request with a simple view

2014-01-05 Thread pythonic . jonathan
Thanks, I'm on example 3 which is the one this is based on. My issue isn't that even something this simple isn't working and I don't know why. In fact, I've already tried the controller thing (example 3) and got the same error (same error). So I went back to basics and converted to h1hello

[web2py] Re: invalid request with a simple view

2014-01-05 Thread Annet
My controller is called index.py: def index(): return dict(message=T(Hello World)) In that case your url should be http://localhost:8000/test/index/index And now I've edited my view to: h1hello world/h1 h2{{=message}}/h2 and your view should be in views/index/index.html in

[web2py] Re: invalid request with a simple view

2014-01-05 Thread pythonic . jonathan
Sorry, but that doesn't seem to do it either. I've tried all of the following. Error invalid view (index/index.html) http://localhost:8000/test/index/index.html http://localhost:8000/test/index/index http://localhost:8000/test/index And the following all give: invalid controller (views/index)

[web2py] Re: invalid request with a simple view

2014-01-05 Thread Anthony
On Sunday, January 5, 2014 10:52:42 AM UTC-5, pythonic...@gmail.com wrote: I'm starting at the start with trying to understand the structure of web2py and how it all fits together (reading books doesn't work for me). I think you should consider going through at least some of the

[web2py] Re: invalid request with a simple view

2014-01-05 Thread Anthony
Not sure how much more descriptive it can be -- in the first case, it is saying there is no index/index.html view in the /views folder, and in the second, it is saying there is no views controller (the request is for views/index). To understand how and where to create views and controllers,

Re: [web2py] Re: invalid request with a simple view

2014-01-05 Thread Jonathan Lundell
On 5 Jan 2014, at 11:53 AM, Anthony abasta...@gmail.com wrote: On Sunday, January 5, 2014 10:52:42 AM UTC-5, pythonic...@gmail.com wrote: I'm starting at the start with trying to understand the structure of web2py and how it all fits together (reading books doesn't work for me). I think you

[web2py] Re: invalid request with a simple view

2014-01-05 Thread pythonic . jonathan
I think you should consider going through at least some of the documentation, as it will be frustrating for you and for us if you just try random things and keep asking questions about what you're doing wrong. The Overview chapter is a tutorial -- read the Intro and Overview at least to

[web2py] Re: invalid request with a simple view

2014-01-05 Thread Anthony
I've taken a glance at it, but the Overview section alone is ~12,000 words - that's a *lot* given it's a technical manual rather than a light bedtime read. Instead I'm working through the examples because I learn better that way: http://www.web2py.com/examples/default/examples You don't

[web2py] Re: Invalid request with special chars in URL

2013-09-05 Thread Wonton
Hello Marcio, First of all, thank you so much for your answer, I haven thought on that possibility and it's very interesting. However, I have a huge number of services and I often test them manually, so I would like to maintain the URLs as readable as possible. I would like to try first with

[web2py] Re: Invalid request with special chars in URL

2013-09-04 Thread Marcio Andrey Oliveira
Can't you send encoded parameters (say in Bas64 or hexadecimal) and decode them inside the methods? Regards. On Wednesday, September 4, 2013 8:24:26 PM UTC-3, Wonton wrote: Hello everyone! I've developed a web2py backend which is given me problems with special chars in URLs. I'm a newbie

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
Thanks for your reply. If I'm adding my app to the raw args, my other code will not work anymore: if len(request.args) == 2: TypeError: object of type 'NoneType' has no len() On Feb 1, 6:57 pm, Bruno Rocha rochacbr...@gmail.com wrote: in your routes.py #specify a list of apps that bypass

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
A request would look like: http://domain.tld/page/show/sample%21/some/more/args It just says invalid request. Firebug gives me this: Content-Length 573 Content-Typetext/html; charset=UTF-8 DateWed, 01 Feb 2012 18:24:57 GMT Server lighttpd/1.4.28 web2py_errorinvalid path (args)

Re: [web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Bruno Rocha
if you map you should use request.raw_args may be including in models request.args = request.raw_args But I am not sure about this, Jonathan is the only one who knows how routes works :) On Wed, Feb 1, 2012 at 4:25 PM, Dan kor...@ironshark.de wrote: A request would look like:

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
Thanks again. I just found this article: http://stackoverflow.com/questions/7279198/allow-20-in-web2py-requests-args But to be honest, it does not make any sense. Why is the percent sign forbidden? Why is request.args set to None if raw args are enabled? Why do we have to enable raw args

Re: [web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Bruno Rocha
On Wed, Feb 1, 2012 at 4:39 PM, Dan kor...@ironshark.de wrote: Could this be fixed in the next update? It is not a bug that needs to be fixed, certainly it is a security decision! -- Bruno Rocha [http://rochacbruno.com.br]