Comment 3 for bug 682685

Revision history for this message
Lev Maximov (lmaximov) wrote :

I also ran into the issue.

The workaround is

Poll.objects.all(question__startswith=unicode(string_extracted_from_bsoup))

The error arises when Django tries to deepcopy NavigableString. Under some circumstances it results in endless recursion.

Attached is an html file. It is really huge, but removing even one tag ceases reproduction of the bug.

The line that ignites the issue is:

deepcopy(BeautifulSoup(open('a.html')).find('table', 'data_ordinary').find_all('td')[1].string)

RuntimeError: maximum recursion depth exceeded in cmp