Forums

another web2py 405 Not Allowed error - error logs blank

I have a simple web2py application that runs fine locally - when loaded to PA the form loads correctly, but when I try to submit it I get a 405 Not Allowed error.

The site is: rob0.pythonanywhere.com

Again the form loads OK, but if you enter a name and submit the form it returns a 405 Not Allowed error.

I looked at the other 405 error posts in the forum - have tried reloading the app many times, and have no errors in the error logs (the error log is blank). Firebug etc show no errors.

I also upgraded to the web dev account to see if that would help - if there was some time limit on the database query, but that hasn't helped either.

The frustrating thing is the lack of an error message in the error logs - just getting a 405 Not Allowed doesn't give a whole lot to work with.

I was able to setup an instance of ubuntu, install web2py on ec2 - uploaded the same application and it runs fine there.

So runs fine locally, runs fine on ec2,( http://ec2-54-68-101-168.us-west-2.compute.amazonaws.com/ )

Still no errors in the error logs on PA, and no tickets in the application either.

Can you get web2py do do some more debugging? Maybe intercept every post request it receives, and write something to a file?

OK - after several hours of troubleshooting (again I'm getting no errors - web2py doesn't complain about anything, so I went though step by step changing pieces to narrow down where the error was occurring), I've narrowed it down to the ajax response for the table of search results.

Here's what's strange - I can return simple results via the web2py response.js method something like, "Hello World". I can return a simple html response like "<div>Hello World</div>" that all works. But the table of results doesn't work. So I figured something was wrong with the table, even though it's being created by a standard web2py component SQLFORM.grid

However if I pass the table back not via response.js the table renders fine...so it doesn't look like it's a problem with the html being sent back. So I can get the application to work here if I just settle for the page reloading to show the results...not really what I wanted, but at least I've narrowed the scope of the problem down.

I'll ask on the web2py google group.

One interesting note - another user may have had similar problems (https://www.pythonanywhere.com/forums/topic/1310/) there jzumsteg says he managed to fix a problem he was having and had response.js working on his local machine and he was going to see if that fixed it here at PA, but that was the end of the post.

hm. keep us posted if the web2py mailing list comes up with anything?