Open williamstein opened 7 years ago
My first thought is this should be in Sage itself, or optionally enabled via a package.
I have no idea what's currently going on, but roughly my idea is to use sys.excepthook and if there is a heuristic match, it amends the error message by some helpful explanation.
I have no idea what's currently going on, but roughly my idea is to use sys.excepthook and if there is a heuristic match, it amends the error message by some helpful explanation.
That would be good for some of these, and not for others.
This is also very similar to the wiki page one gets by clicking "Help" in a Sage worksheet right now: https://github.com/sagemathinc/cocalc/wiki/sagews Another thing to do would be to turn this document into a wiki page and link to it prominently from the top of https://github.com/sagemathinc/cocalc/wiki/sagews.
Specialized help for particular types of error messages could come later.
Since I may continue to add to my original LaTeX document, I have shared it in CoCalc. You can view it here.
From my perspective as a teacher, I would like to see the error messages in Sage condensed, probably just displaying the last line. Perhaps there could be a check box in the general settings allowing the user to choose to display the stack trace or not.
Ideally, when an error occurs, there would be a link or button saying "Help me with this error" displaying right under the error message. Clicking that could open a webpage (or a box right in CoCalc) that would provide hints about that specific error.
I'm not sure how feasible that is in general. I see students make very particular types of errors, but I only use Sage for Calculus 1/2. My error hints may not be useful in other contexts.
But whatever happens, I do thank you for thinking about this.
My first thought is this should be in Sage itself, or optionally enabled via a package.
Whether or not that makes sense depends a lot on:
@aarontresham your traceback suggestion is https://github.com/sagemathinc/cocalc/issues/299
Created by Aaron Tresham.
Sage Common Mistakes.pdf
This is really a tex file, but Github made me rename it:
Sage Common Mistakes.txt