{"action":"created","issue":{"url":"https://api.github.com/repos/sagemathinc/smc/issues/223","repository_url":"https://api.github.com/repos/sagemathinc/smc","labels_url":"https://api.github.com/repos/sagemathinc/smc/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/sagemathinc/smc/issues/223/comments","events_url":"https://api.github.com/repos/sagemathinc/smc/issues/223/events","html_url":"https://github.com/sagemathinc/smc/issues/223","id":114720132,"number":223,"title":"sagews tracebacks *MUST* show line number and line where problem happened! ","user":{"login":"williamstein","id":1276278,"avatar_url":"https://avatars.githubusercontent.com/u/1276278?v=3","gravatar_id":"","url":"https://api.github.com/users/williamstein","html_url":"https://github.com/williamstein","followers_url":"https://api.github.com/users/williamstein/followers","following_url":"https://api.github.com/users/williamstein/following{/other_user}","gists_url":"https://api.github.com/users/williamstein/gists{/gist_id}","starred_url":"https://api.github.com/users/williamstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamstein/subscriptions","organizations_url":"https://api.github.com/users/williamstein/orgs","repos_url":"https://api.github.com/users/williamstein/repos","events_url":"https://api.github.com/users/williamstein/events{/privacy}","received_events_url":"https://api.github.com/users/williamstein/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sagemathinc/smc/labels/A-sagews","name":"A-sagews","color":"fbca04"},{"url":"https://api.github.com/repos/sagemathinc/smc/labels/I-bug","name":"I-bug","color":"cc0000"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-11-03T01:00:21Z","updated_at":"2016-07-07T18:26:44Z","closed_at":null,"body":"Idea: in a sage worksheet, when rendering tracebacks, modify line number of code pointing to the worksheet itself to somehow match the current line numbers in the worksheet..\r\n\r\nSee [this worksheet](https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-02-170011-line-numbers-git-issue-223.sagews).  \r\n\r\nWhat we need to do:\r\n\r\n- [ ] create a new output type called \"traceback\", which is not just stderr.   This would involve adding code to `src/smc_sagews/smc_sagews/sage_server.py`.  See the Message business (look at how stderr is implemented).\r\n\r\n- [ ] in the evaluation code, when a traceback is hit, produce a traceback object as output, rather than a string in stderr.\r\n\r\n- [ ] when displaying a traceback (like in the worksheet linked to above), it currently starts with \"Error in lines 2-2\".  Where it says \"lines 2-2\" we need to dynamically change that to actually show the line to the left.  This means that traceback output has to get re-rendered whenever the line that it is on changes.  There's nothing like this in sagews now -- it's a totally new crazy thing.    ALTERNATIVELY, an easier (lamer) solution would be to just rewrite the traceback and replace say \"lines 2-2\" with \"the line `a / 0`\", i.e., put the actual content of the line there.  This would not be as good, but could be done once only on the server so is easier. \r\n\r\nThere may also be interesting subtleties with all the other modes, e.g.,%r, %latex, etc..."},"comment":{"url":"https://api.github.com/repos/sagemathinc/smc/issues/comments/231165625","html_url":"https://github.com/sagemathinc/smc/issues/223#issuecomment-231165625","issue_url":"https://api.github.com/repos/sagemathinc/smc/issues/223","id":231165625,"user":{"login":"novoselt","id":1993227,"avatar_url":"https://avatars.githubusercontent.com/u/1993227?v=3","gravatar_id":"","url":"https://api.github.com/users/novoselt","html_url":"https://github.com/novoselt","followers_url":"https://api.github.com/users/novoselt/followers","following_url":"https://api.github.com/users/novoselt/following{/other_user}","gists_url":"https://api.github.com/users/novoselt/gists{/gist_id}","starred_url":"https://api.github.com/users/novoselt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoselt/subscriptions","organizations_url":"https://api.github.com/users/novoselt/orgs","repos_url":"https://api.github.com/users/novoselt/repos","events_url":"https://api.github.com/users/novoselt/events{/privacy}","received_events_url":"https://api.github.com/users/novoselt/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T18:26:44Z","updated_at":"2016-07-07T18:26:44Z","body":"And examples how it works are here: https://groups.google.com/d/topic/sage-devel/-KiMrG--5x8/discussion"}}
{"actor":{"display_login":"novoselt"}}