I have about 6 TB of saved Sage objects that I would like to recover, so am interested in testing the fix.
On Thursday, 20 August 2020 at 14:10:34 UTC+10 Paul Leopardi wrote: > Done. https://trac.sagemath.org/ticket/30402 > > On Thursday, 20 August 2020 at 02:35:15 UTC+10 Nils Bruin wrote: > >> On Wednesday, August 19, 2020 at 5:24:48 AM UTC-7, Paul Leopardi wrote: >>> >>> See also >>> https://groups.google.com/g/sage-support/c/3WKui-LojKs/m/DgEPBGF3AQAJ >>> and https://trac.sagemath.org/ticket/28444 >>> >>> On Wednesday, 19 August 2020 at 22:17:40 UTC+10 Paul Leopardi wrote: >>> >>>> Hello, >>>> I am currently trying to convert my Boolean-Cayley-graphs project from >>>> Python 2 to Python 3 Sage. >>>> https://github.com/penguian/Boolean-Cayley-graphs/tree/23-port-to-python-3 >>>> >>>> I have succeeded in converting the code, but am having a tough time >>>> trying to load objects that were saved by my previous Python 2-based code. >>>> These objects contain matrices as members.What do I need to do to be able >>>> to load these objects? >>>> >>>> As far as I can tell, load(...,encoding='latin-1') doesn't work with a >>>> dict containing a matrix but load(...,encoding='bytes') does. See the >>>> attachment. >>>> Thanks! >>>> >>> >> Yes, we know how to fix it and it's not complicated: if "bytes" is >> expected in a pickle and a "str" is found, we should assume it represents >> the bytes-object via latin-1. It's come up in matrices elsewhere and we >> should just make this change. We've already determined that >> "encoding='bytes'" is a lot harder to get to work. >> >> Please open a ticket. Fixing this should save a LOT of pickles. >> > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/ce3aeb65-4d8b-4d67-b8ac-64f1d35c56fen%40googlegroups.com.