[web2py] Logger creating recursion error

2021-09-26 Thread Jon Subscripted
Hi everyone,
I suddenly started experiencing an application crash, with no code change
whatsoever.

I started to get a ` maximum recursion
depth exceeded in cmp` error.

```Traceback (most recent call last):
  File "/home/jonsubscriptions/web2py/gluon/restricted.py", line 219, in
restricted
exec(ccode, environment)
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/controllers/default.py",
line 3077, in 
  File "/home/jonsubscriptions/web2py/gluon/globals.py", line 421, in

self._caller = lambda f: f()
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/controllers/default.py",
line 21, in index
datalayer = get_datalayer('general','index')
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/models/datalayer.py",
line 44, in get_datalayer
datalayer_dict = get_datalayer_dict(pagetype,pagecategory)
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/models/datalayer.py",
line 15, in get_datalayer_dict
'lang':get_lang(),
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/controllers/default.py",
line 477, in get_lang
logger.debug("Exception %s"%e)
  File "/usr/lib/python2.7/logging/__init__.py", line 1140, in debug
self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1271, in _log```

As I saw tha logging module was involved I commented out all logger calls
and got back up and running.

Any idea on what might be causing the error?

Any idea how can I fix this to get my logging back? Any suggestions?
Thanks, Jon.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33J2v35rJDzc_HFuJmS2Jgg0qO2kGZwGjEnGS7kuZ%2BBuA%40mail.gmail.com.


[web2py] A friend has developed a flask application and now wants to add a login and security. I would like to know if it would be feasible to convert the flask application to web2py.

2021-09-26 Thread Davidiam
A friend asked me if I would be interested in building the login/security 
layer for a flask / My SQL application on PyhtonAnywhere, but I don't know 
Flask and I really like web2py and have already created a few applications 
using web2py.

I told her that web2py has the security included and if it wasn't too much 
work, it may be easier to move the application to web2py and I told her I 
would try to find out how much work that would be.

So basically I would like to know how difficult it would be to convert a 
Flask-MySQL application to web2py.  Would the general structure of the 
application be the same?  It is a newly developed application and not very 
heavy in code, but has quite a bit of data.   

Py4web would of course also be an option but I have not used that yet so 
there would probably be a small learning curve involved.  I suspect Py4web 
would give better performance.

Kind Regards,
David

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3c299169-b1c0-4c1a-9a98-9ae99bf49d25n%40googlegroups.com.