Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are 2 issues here. First, Plantri format is binary and so you should have opened the file in binary mode as open("5reg_20-32.pc", "rb"). However, this won't be sufficient as Sage in this line checked the header as header == '>>planar_code<<' while it should have been header == b'>>planar_code<<'. If you feel comfortable changing the Sage code, this single addition of letter b should have fix things up.

Deep down the error is caused by incorrect treatment of hex code 0A in text file. So, the bug potentially affect any graph with 10 or more vertices.

There are 2 issues here. First, Plantri format is binary and so you should have opened the file in binary mode as open("5reg_20-32.pc", "rb"). However, this won't be sufficient as Sage in this line checked the header as header == '>>planar_code<<' while it should have been header == b'>>planar_code<<'. If you feel comfortable changing the Sage code, this single addition of letter b should have fix things up.

Deep down the error is caused by incorrect treatment of hex code 0A in text file. So, the bug potentially affect any graph with 10 or more vertices.

PS. I've reported the issue at https://github.com/sagemath/sage/issues/40062

There are 2 issues here. First, Plantri format is binary and so you should have opened the file in binary mode as open("5reg_20-32.pc", "rb"). However, this won't be sufficient as Sage in this line checked checks the header as header == '>>planar_code<<' , while it should have been checked header == b'>>planar_code<<'. If you feel comfortable changing the Sage code, this single addition of letter b should have fix things up.

Deep down the error is caused by incorrect treatment of hex code 0A in text file. So, the bug potentially affect any graph with 10 or more vertices.

PS. I've reported the issue at https://github.com/sagemath/sage/issues/40062