Forums

Unhandled Exception out of nowhere

I am using web2py and using a default app to point to a 'coming soon' page. It was working just fine up until yesterday. That's when it started giving off an 'unhandled exception' error, which seems to be occurring while loading the webserver (wsgi) request and prior to executing anything inside web2py. The traceback points to an error in /usr/ and /bin/, but as I understand this should be handled by pythonanywhere sysadmins, no?

Can someone please help figure this out? Here's the log:: Thanks. 2014-05-08 03:23:53,343 :TypeError: compile_regex() takes at most 3 arguments (9 given) 2014-05-08 03:25:58,530 :Traceback (most recent call last): 2014-05-08 03:25:58,531 : File "/bin/user_wsgi_wrapper.py", line 67, in call 2014-05-08 03:25:58,531 : self.error_log_file.logger.exception("Error running WSGI application") 2014-05-08 03:25:58,531 : File "/usr/lib/python2.7/logging/init.py", line 1183, in exception 2014-05-08 03:25:58,532 : self.error(msg, args, kwargs) 2014-05-08 03:25:58,532 : File "/usr/lib/python2.7/logging/init.py", line 1176, in error 2014-05-08 03:25:58,532 : self._log(ERROR, msg, args, *kwargs) 2014-05-08 03:25:58,532 : File "/usr/lib/python2.7/logging/init.py", line 1268, in _log 2014-05-08 03:25:58,533 : record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra) 2014-05-08 03:25:58,533 : File "/usr/lib/python2.7/logging/init.py", line 1242, in makeRecord 2014-05-08 03:25:58,533 : rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func) 2014-05-08 03:25:58,533 : File "/usr/lib/python2.7/logging/init.py", line 284, in init 2014-05-08 03:25:58,534 : self.threadName = threading.current_thread().name 2014-05-08 03:25:58,534 : File "/usr/lib/python2.7/threading.py", line 1158, in currentThread 2014-05-08 03:25:58,534 : return _active[_get_ident()] 2014-05-08 03:25:58,534 : File "/bin/user_wsgi_wrapper.py", line 59, in call 2014-05-08 03:25:58,535 : app_iterator = self.app(environ, start_response) 2014-05-08 03:25:58,535 : File "/bin/user_wsgi_wrapper.py", line 73, in import_error_application 2014-05-08 03:25:58,535 : raise e 2014-05-08 03:25:58,535 :TypeError: compile_regex() takes at most 3 arguments (9 given)

So is this kind of thing common on pythonanywhere.com

To me it looks like the problem is most likely coming from this line:

TypeError: compile_regex() takes at most 3 arguments (9 given)

Do you have any idea what might be causing that?

It didn't occur to me that this occurred after adding some new routes to routes.py inside an application folder (web2py).

To locate this error, I googled the 'compile_regex() web2py' to verify as harry hinted whether this was caused by a web2py bug. It was right there, this was caused by an invalid route inside my routes.py.

Fixed the error by removing the faulty routes. Website is up again!

Thanks.