Logger creating recursion error

16 views
Skip to first unread message

Jon Subscripted

unread,
Sep 26, 2021, 1:42:30 PM9/26/21
to web...@googlegroups.com
Hi everyone,
I suddenly started experiencing an application crash, with no code change whatsoever.

I started to get a `<type 'exceptions.RuntimeError'> 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 <module>
  File "/home/jonsubscriptions/web2py/gluon/globals.py", line 421, in <lambda>
    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. 
Reply all
Reply to author
Forward
0 new messages