Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\bs4\element.py", line 1045, in __str__ return self.encode() File "C:\Python27\lib\site-packages\bs4\element.py", line 1055, in encode u = self.decode(indent_level, encoding, formatter) File "C:\Python27\lib\site-packages\bs4\element.py", line 1126, in decode indent_contents, eventual_encoding, formatter) File "C:\Python27\lib\site-packages\bs4\element.py", line 1195, in decode_contents formatter)) File "C:\Python27\lib\site-packages\bs4\element.py", line 1126, in decode ...... File "C:\Python27\lib\site-packages\bs4\element.py", line 1126, in decode indent_contents, eventual_encoding, formatter) File "C:\Python27\lib\site-packages\bs4\element.py", line 1195, in decode_contents formatter)) File "C:\Python27\lib\site-packages\bs4\element.py", line 1098, in decode text = self.format_string(val, formatter) File "C:\Python27\lib\site-packages\bs4\element.py", line 163, in format_string output = formatter(s) File "C:\Python27\lib\site-packages\bs4\element.py", line 120, in substitute_xml ns, EntitySubstitution.substitute_xml) File "C:\Python27\lib\site-packages\bs4\element.py", line 104, in _substitute_if_appropriate if (isinstance(ns, NavigableString) RuntimeError: maximum recursion depth exceeded while calling a Python object