Comment 4 for bug 1471755

Revision history for this message
Emil Stenström (em-u) wrote : Re: Many unclosed tags result in RuntimeError: maximum recursion depth exceeded while calling a Python object

@cojoco: This still happens for me. It seems I have to print the result now to get the error, so maybe bs4 is lazy now. This reproduces the problem for me:

from bs4 import BeautifulSoup
html = ''.join(['<br>' for x in range(1000)])
print BeautifulSoup(html, "html.parser")

(I've also specified the parser to avoid differences in environments)

$ pip freeze
beautifulsoup4==4.4.1
six==1.10.0
wheel==0.24.0

$ python --version
Python 2.7.10

Running Mac OSX 10.11.5 (15F34).