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

matplotlib images not working in my environment #30

Open
danizen opened this issue Sep 5, 2019 · 3 comments
Open

matplotlib images not working in my environment #30

danizen opened this issue Sep 5, 2019 · 3 comments

Comments

@danizen
Copy link
Contributor

danizen commented Sep 5, 2019

The image is properly attached to the page, but is not displaying correctly. After I run nbconflux to update the page, and then request its content with body.storage expanded, I see this in the body.storage.value:

<ac:image><ri:url ri:value="https://wiki.nlm.nih.gov/download/attachments/146342104/output_15_1.png?version=3" /></ac:image>

However, when I fix this manually in the page with an attachment link, I see:

<ac:image ac:height="250"><ri:attachment ri:filename="output_15_1.png" /></ac:image>

It looks like the two lines that need a change are:

confluence.tpl line 148
confluence.tpl line 156

I will attempt a fix and get back to you.

Possible related issues: #17

@danizen
Copy link
Contributor Author

danizen commented Sep 5, 2019

I reviewed the Confluence Storage Format documentation, and satisfied myself that using ri:attachment is better than ri:url.

@danizen
Copy link
Contributor Author

danizen commented Sep 5, 2019

Note, markdown images could be made similar as follows:

  • copying the original image
  • placing it in the page as an attachment
  • referencing it as an attachment

@danizen
Copy link
Contributor Author

danizen commented Sep 18, 2019

Some more information for diagnosing the problem:

https://example.com/confluence/display/~davisda4/Page+with+DataFrame+and+Plot
https://example.com/confluence/pages/editpage.action?pageId=146342104

Seems like the code in nbconflux\exporter.py needs to keep everything to the left of the patterns it identifies as a prefix, and then use that to construct the URL for attachments that are uploaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant