You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <de...@bloodhound.apache.org> on 2014/07/08 12:45:59 UTC
[Apache Bloodhound] #805: maximum recursion depth exceeded when
creating ticket from script
#805: maximum recursion depth exceeded when creating ticket from script
-----------------------+----------------------
Reporter: wimh | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone:
Component: trac core | Version: 0.8.0dev
Keywords: |
-----------------------+----------------------
email2trac fails on the current trunk. I have reduced the script to the
part required to reproduce this issue. I'll attach the full script to this
ticket. The line where the exception is generated is:
{{{
tkt = Ticket(env)
}}}
part of the traceback:
{{{
#!text/plain
Traceback (most recent call last):
File "testticket.py", line 32, in <module>
tkt = Ticket(env)
File "/var/www/bloodhound/python-virtualenv/lib/python2.7/site-
packages/trac/ticket/model.py", line 71, in __init__
self.fields = TicketSystem(self.env).get_ticket_fields()
File "/var/www/bloodhound/python-virtualenv/lib/python2.7/site-
packages/trac/ticket/api.py", line 310, in get_ticket_fields
fields = copy.deepcopy(self.fields)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
...
File "/var/www/bloodhound/python-virtualenv/lib/python2.7/site-
packages/babel/support.py", line 182, in value
if self._value is None:
File "/var/www/bloodhound/python-virtualenv/lib/python2.7/site-
packages/babel/support.py", line 252, in __getattr__
return getattr(self.value, name)
File "/var/www/bloodhound/python-virtualenv/lib/python2.7/site-
packages/babel/support.py", line 182, in value
if self._value is None:
File "/var/www/bloodhound/python-virtualenv/lib/python2.7/site-
packages/babel/support.py", line 252, in __getattr__
return getattr(self.value, name)
RuntimeError: maximum recursion depth exceeded while calling a Python
object
}}}
Note this fails on the current trunk (r1608614), but works fine in the 0.7
tag.
I was able to fix the error by changing in {{{python-
virtualenv/lib/python2.7/site-packages/trac/ticket/api.py
(get_ticket_fields)}}}
{{{
fields = copy.deepcopy(self.fields)
}}}
into
{{{
fields = []
for f in self.fields:
fields.append(copy.copy(f))
}}}
But I don't know whether that has disadvantages. I can create tickets in
the web interface. So it should also be possible to fix this in the
script.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/805>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker