Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intraceable error messages #14670

Open
sagetrac-ManDay mannequin opened this issue May 30, 2013 · 4 comments
Open

Intraceable error messages #14670

sagetrac-ManDay mannequin opened this issue May 30, 2013 · 4 comments

Comments

@sagetrac-ManDay
Copy link
Mannequin

sagetrac-ManDay mannequin commented May 30, 2013

SAGE swarms by useless pseudo-error messages like

"Negative number cannot be raised to a fractional power"

or

"maximum recursion depth exceeded while getting the str of an object"

Once these appear, there is no other way to finding the cause than bisecting the code. Please keep an eye open while you work on the source and replace these things by proper errors, which can be backtraced, when you come across them.

Component: misc

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

@sagetrac-ManDay sagetrac-ManDay mannequin added this to the sage-5.11 milestone May 30, 2013
@jasongrout
Copy link
Member

comment:1

How do we know when we can close this ticket?

From the description, it sounds like this caution might be better suited as a post to sage-devel about general development advice, or maybe a patch to the developer's guide.

@sagetrac-ManDay
Copy link
Mannequin Author

sagetrac-ManDay mannequin commented May 30, 2013

comment:2

Fair enough, how about closing this ticket once the two error messages above have been adressed (assuming you agree that this is indeed a problem)?

@jhpalmieri
Copy link
Member

comment:3

These error messages don't appear anywhere in the Sage code:

sage: search_src('number', 'cannot', 'raised')

sage: search_src('getting', 'str', 'object')

Can you provide explicit examples showing these error messages?

@sagetrac-ManDay
Copy link
Mannequin Author

sagetrac-ManDay mannequin commented May 31, 2013

comment:4

The error message about negative numbers is the same you get when

( float(-3) )**( 1/2 )

with the only difference, that in this case, it's a real ValueError. If I recall correctly, I often got such pseudo errors from somewhere in the execution stack of minimize( ) or minimize_constrained( ).

I can't readily reproduce it right now (or only with a huge code), but as soon as I've found a better example, I'll submit it.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants