Opened 11 years ago
Closed 2 years ago
#11249 closed defect (invalid)
Make sure R graphics in notebook live in correct place
Reported by: | kcrisman | Owned by: | jason, mpatel, was |
---|---|---|---|
Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |
Component: | notebook | Keywords: | r-project |
Cc: | kcrisman, jhpalmieri | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Currently the following can happen in the notebook.
Here is what happens. Somehow it first is given a temp name like .Rplot001.png-0TJi, which shows up as a link, and then you click on the link and nothing useful happens. But then I go to cd .sage/sage_notebook.sagenb/home/admin/106/cells/38/ (or whatever cell you are in) and I see ls Rplot001.png and that is a normal plot. So somehow the temp name is funky when displayed.
This should be fixed so that the link is to a real file. Somehow there is something added to the filename.
This is related to, but not the same as #8868, which is about making R graphics always work; this is about making them work better when they already work.
Change History (7)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Nope, this isn't it, though close. Maybe? But time.time()
isn't doing the appending. Where is this coming from?
comment:3 Changed 11 years ago by
Well, but it's not far away...
<div class="cell_output_html_wrap" id="cell_output_html_38"> <img src="/home/admin/106/cells/38/Rplot001.png?1303999010"><a target="_new" href="/home/admin/106/cells/38/.Rplot001.png-0TJi" class="file_link">.Rplot001.png-0TJi</a>
And I think I know where that extra thing comes from. R must create a brief temp file, which is found by the notebook cell in files_html() in sagenb/notebook/cell.py:
else: link_text = str(F) if len(link_text) > 40: link_text = link_text[:10] + '...' + link_text[-20:] files.append('<a target="_new" href="%s" class="file_link">%s</a>'%(url, link_text))
And this only happens every other time I re-evaluate the cell... Aha! So that means the old file is being moved to a temporary site, and that is being caught. But it quickly is eaten up before I can catch it. Wanna bet? But I haven't been able to catch it, not even with
while True do ls sleep .1 done
comment:4 Changed 11 years ago by
- Keywords r-project added
comment:5 Changed 2 years ago by
- Cc kcrisman jhpalmieri added
- Milestone set to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
yet another ancient ticket about deprecated sagenb, can we close ?
comment:7 Changed 2 years ago by
- Resolution set to invalid
- Status changed from positive_review to closed
thx
Ah, I finally tracked it down. In sagenb/notebook/cell.py: