Unfortunately, whenever SymPy Live gets any error at all, it says
"Time limit exceeded". The actual error in this case is that
ReferenceFrame is not pickable. You can reproduce this in regular
SymPy with
import pickle
from sympy.physics.mechanics import ReferenceFrame
pickle.load(pickle.dumps(ReferenceFrame("N")))
I opened
https://code.google.com/p/sympy/issues/detail?id=3570 and
https://code.google.com/p/sympy/issues/detail?id=3569 for these
respective issues.
And an aside: we really should look at better ways to serialize
objects in SymPy live than pickle. It causes tons of problems,
because SymPy objects are very complex, and tend to be not pickable or
almost not pickable. The last time this happened, it showed up in a
very bizarre way, and ended up being very difficult to track down, and
very difficult to fix (see
https://code.google.com/p/sympy/issues/detail?id=2587). Also, some
fundamental SymPy objects (namely Function) are still not pickable,
and it would require a fundamental rewrite to make them so (see
https://code.google.com/p/sympy/issues/detail?id=1198; hopefully
ReferenceFrame doesn't have the same issue). And from my memory, there
are also issues with limitations in pickle (you can't send keyword
arguments to __new__ or something like that).
Does anyone know of a more general way we can serialize our data? I
thought marshal would be it, but apparently it is even more limited
than pickle. Otherwise, we just need to fight the good fight for
pickablility, just like we did for hash randomization and .args
reconstruction, until we are confidant that everything in the library
works. Unfortunately, unlike making obj.__class__(obj.args) == obj or
even fixing hash difference errors, making things pickable is *very*
difficult in general, and requires some pretty hefty knowledge of how
Python classes work and how we use them.
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/sympy/-/wYVT2vucOvYJ.
> To post to this group, send email to
sy...@googlegroups.com.
> To unsubscribe from this group, send email to
>
sympy+un...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/sympy?hl=en.