Sage version 9.1 still supports python2. Compile it from source using 
"./configure --with-python=2" and check whether the resulting sage can read 
your file.

On Friday, July 24, 2020 at 3:03:07 PM UTC-7, Udo Baumgartner wrote:
>
> I have lots of precomputed data computed by sage8.9 and before that I rely 
> on. The reason I save that data is that it took a lot of computation time 
> to obtain it. The data is saved as .sobj-files. 
>
> Suddenly I get "invalid pickle data"-errors when trying to load some of 
> that data with the new version of sage. I am therefore unable to do 
> computations on top of the precomputed data. 
>
> I strongly suspect that this issue is due to basing sage9.x on Python3. 
>
> How do I convert the data so that I can use it in the new version of sage?
>
> I'm using *sage-9.1-OSX_10.15.4-x86_64.app* now on a late 2013 MacBookPro 
> running MacOSCatalina 10.15.6. A toy example of a sobj-file that now 
> produces the error is attached. The error messages are reproduced below.
>
>
> Help is greatly appreciated.
>
>
> Now, said error messages:
>
> ---------------------------------------------------------------------------RuntimeError
>                               Traceback (most recent call 
> last)<ipython-input-1-90aa9dc4a056> in <module>()----> 1 DiGraph = 
> load('A3VuDiGraph')
> /Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/misc/persist.pyx
>  in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2900)()    
> 156     157     ## Load file by absolute filename--> 158     with 
> open(filename, 'rb') as fobj:    159         X = loads(fobj.read(), 
> compress=compress, **kwargs)    160     try:
> /Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/misc/persist.pyx
>  in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2850)()    
> 157     ## Load file by absolute filename    158     with open(filename, 
> 'rb') as fobj:--> 159         X = loads(fobj.read(), compress=compress, 
> **kwargs)    160     try:    161         X._default_filename = 
> os.path.abspath(filename)
> /Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/misc/persist.pyx
>  in sage.misc.persist.loads (build/cythonized/sage/misc/persist.c:7424)()   
> 1042    1043     unpickler = SageUnpickler(io.BytesIO(s), **kwargs)-> 1044    
>  return unpickler.load()   1045    1046 
> /Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/matrix/matrix0.pyx
>  in sage.matrix.matrix0.unpickle 
> (build/cythonized/sage/matrix/matrix0.c:39715)()   5874     A._cache = cache  
>  5875     if version >= 0:-> 5876         A._unpickle(data, version)   5877   
>   else:   5878         A._unpickle_generic(data, version)
> /Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/matrix/matrix_integer_dense.pyx
>  in sage.matrix.matrix_integer_dense.Matrix_integer_dense._unpickle 
> (build/cythonized/sage/matrix/matrix_integer_dense.c:8217)()    540           
>       self._unpickle_matrix_2x2_version0(data)    541             else:--> 
> 542                 raise RuntimeError("invalid pickle data")    543         
> else:    544             raise RuntimeError("unknown matrix version 
> (=%s)"%version)
> RuntimeError: invalid pickle data
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/923a0b3c-8114-496e-ab28-25bd36b287a3o%40googlegroups.com.

Reply via email to