You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error results: TypeError: unicode argument expected, got 'str'
The exception is not seen if adding a single whitespace before the newline. In html.py, the code branches to if line is there is a single whitespace and newline, but branches to else: yield 1, lsep if there's only a newline. The returned newline (lsep) seems to be a byte string rather than a unicode string (str type rather than unicode type in Python 2.7). I haven't tested with Python 3/
A successful workaround is to specify lineseparator as a unicode string.
(Original issue 1349 created by None on 2017-05-09T04:32:19.850113+00:00)
I've reported this issue in the Trac Project with Pygments 2.2. It can be reproduced in Python 2.7 with:
An error results:
TypeError: unicode argument expected, got 'str'
The exception is not seen if adding a single whitespace before the newline. In html.py, the code branches to
if line
is there is a single whitespace and newline, but branches toelse: yield 1, lsep
if there's only a newline. The returned newline (lsep
) seems to be a byte string rather than a unicode string (str
type rather thanunicode
type in Python 2.7). I haven't tested with Python 3/A successful workaround is to specify
lineseparator
as a unicode string.The text was updated successfully, but these errors were encountered: