redbaron icon indicating copy to clipboard operation
redbaron copied to clipboard

Fix unicode errors when rendering to IPython notebook

Open remram44 opened this issue 10 years ago • 4 comments

Kinda-fixes Psycojoker/baron#66: the example notebook linked there now works (if input is bytes).

remram44 avatar May 28 '15 19:05 remram44

Hello,

Do you think that it's possible to write a test for that? Nevertheless, thanks a lot for this pull request :)

Kinds regards,

Psycojoker avatar May 28 '15 22:05 Psycojoker

I'm sure I can make you something... There's a risk I might find other unicode-related issues though :wink:

remram44 avatar May 28 '15 23:05 remram44

That would be great!

ibizaman avatar May 29 '15 08:05 ibizaman

As I thought, RedBaron() expects bytes on Python 2 and str on Python 3 :cry:

I added a test, but it doesn't pass on Python 3: it looks like .node_list gives out a list instead of a NodeList, so _repr_html_() doesn't exist?

remram44 avatar May 29 '15 18:05 remram44