Modify

Opened 2 years ago

Last modified 18 months ago

#10342 new defect

RuntimeError: maximum recursion depth exceeded while calling a Python object

Reported by: anonymous Owned by: Reinhard
Priority: normal Component: CondFieldsGenshiPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

It looks like there is a limit on how many fields can be used by this plugin. Is there a possible fix for this?

Works with 22 fields, but breaks with recursion error with 23 fields.

Attachments (0)

Change History (8)

comment:1 Changed 2 years ago by anonymous

  • Trac Release changed from 0.12 to 1.0

comment:2 Changed 2 years ago by anonymous

This is quite strange and could be caused by the release change to Trac 1.0 (this is a hypothesis only). I still work with Trac 0.12, but I have no explanation for this "magic 23". It could also be caused by Genshi. Which Genshi release do you use, and could you send a stack trace? - Reinhard

comment:3 follow-up: Changed 2 years ago by anonymous

Here is the trace it generates.

2012-09-20 10:28:12,528 Trac[main] ERROR: Internal Server Error: 
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 497, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 233, in dispatch
    content_type)
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 1000, in render_template
    encoding='utf-8')
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 272, in _ensure
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 272, in _ensure
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 1137, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 272, in _ensure
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 1126, in _generate
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 272, in _ensure
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 272, in _ensure
--
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 686, in _unmark
    for mark, event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 1107, in __call__
    for mark, event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 117, in __iter__
    event = self.stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 714, in __call__
    for mark, event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 682, in _mark
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 272, in _ensure
--
(repeated 121 times)
--
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 686, in _unmark
    for mark, event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 1081, in __call__
    for mark, event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 117, in __iter__
    event = self.stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/filters/transform.py", line 711, in __call__
    test = self.path.test()
  File "/usr/lib/python2.6/site-packages/genshi/path.py", line 631, in test
    tests = [s.test(ignore_context) for s in self.strategies]
RuntimeError: maximum recursion depth exceeded

comment:4 in reply to: ↑ 3 ; follow-up: Changed 2 years ago by Reinhard

This looks very like a Genshi error. However, it is not possible for me to trac this. The error could be caused by the label and position of the field(s), and/or the number, or anything else :-(. I am not a Genshi developer - we should ask the experts what happens here. I use Genshi 0.5.1.

Does this error vanish if you delete another field instead of the "23rd"?

Reinhard

BTW, one should not post such long listings :-)

comment:5 Changed 2 years ago by anonymous

Sorry about that. It doesn't matter what fields I delete, just as long as there are only 22 fields, it works fine.

comment:6 in reply to: ↑ 4 Changed 2 years ago by hasienda

Replying to Reinhard:

BTW, one should not post such long listings :-)

Sure, I've shortened it a bit.

comment:7 in reply to: ↑ description Changed 18 months ago by anonymous

Replying to anonymous:

It looks like there is a limit on how many fields can be used by this plugin. Is there a possible fix for this?

Works with 22 fields, but breaks with recursion error with 23 fields.


Any updates about this bug ?
Is there a possible fix ?

comment:8 Changed 18 months ago by Reinhard

No, sorry, especially since a do not work with Trac recently - and there was really no explanation for this behaviour, cumbersome debugging would be necessary ... I am afraid, this magic number "23" depends on release an configuration (of Trac and computer), so tracking this error could be almost impossible for me!

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.