This is now #6462.

(I have played with it a bit myself, and I can get pickling and
unpickling to work, by defining a __reduce__ function for orders, and
adjusting the __reduce__ function for number field elements; but now
the standard x == loads(dumps(x)) test doesn't seem to work.)

David

On Jul 3, 6:13 pm, daveloeffler <[email protected]> wrote:
> I'm having trouble with unpickling some elements of an order in a
> quadratic number field.
>
> If I do
>
> sage: L = QuadraticField(-11,'a'); OL = L.maximal_order(); w = OL.0
> sage: loads(dumps(w))
>
> then I get a traceback ending with
>
> AttributeError: 'AbsoluteOrder' object has no attribute '_is_maximal'
>
> With orders in higher-degree fields, I get a different error message:
>
> sage: L = NumberField(x^3 - x - 1,'a'); OL = L.maximal_order(); w = OL.
> 0
> sage: loads(dumps(w))
> ...
> AttributeError: 'NumberField_absolute' object has no attribute
> 'number_field'
>
> (and the analogous thing for relative fields as well.)
>
> Any suggestions? This is a real problem because I am working on a
> computation where I need to be able to save results to disc, and this
> result is preventing me from loading what I've saved. (Elements of the
> fields rather than the orders unpickle OK, but it's next to impossible
> to prevent elements of the orders creeping in somehow when I pickle
> stuff.)
>
> David
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to