Skip to content

conversion of string 'r' in fraction field #26155

@dkrenn

Description

@dkrenn

With #26150 the code

sage: QQ['x'].fraction_field()('r')

gives the error

ValueError: invalid literal for int() with base 10: "Error in dput(length(sage2)) : object 'sage2' not foun"

as the string 'r' is interpreted as

sage: sage_eval('r', QQ['x'].fraction_field().gens_dict_recursive())
R Interpreter

(the above is what happens in L.607 in fraction_field.py).

Before the fix #26150 the error was

TypeError: unable to convert '[1] 0' to a rational

and this change causes the failing doctest in #26150 (see #26150 comment:5) somewhere in the coercion model, where it is tried to create 'r' in the above fraction field.

CC: @jdemeyer

Component: coercion

Branch/Commit: u/dkrenn/t/26155 @ c7aae72

Issue created by migration from https://trac.sagemath.org/ticket/26155

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions