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

Special characters in metadata groups break links to graphs #317

Closed
colinbrislawn opened this issue Sep 29, 2021 · 6 comments
Closed

Special characters in metadata groups break links to graphs #317

colinbrislawn opened this issue Sep 29, 2021 · 6 comments
Labels
good first issue Good for newcomers

Comments

@colinbrislawn
Copy link

Bug Description
A metadata subcategory called HF+ caused the generated .pdf and png files within the .qzv file to have different names, breaking the embedded figure and link on view.qiime2.org.

Screen Shot 2021-09-29 at 3 24 32 PM

Steps to reproduce the behavior
See the attached file for a broken output:
VIEWABLE_braycurtis-norm_feature-table_HF_Status_missingBoxPlot.zip

Expected behavior
Links are preserved, through consistent file names or sanitized metadata categories.

Computation Environment

  • QIIME 2 Release: file made with Qiime2 2020.11
  • Current version of view.qiime2.org
@ebolyen
Copy link
Member

ebolyen commented Sep 29, 2021

Thanks for the report! Looks like there's disagreement in URI encoding between JS and Python:

>>> urllib.parse.quote("+")
'%2B'

> encodeURI("+")
'+'

Which explains why this is happening. The visualizer seems to have escaped it with the expectation that q2view would do a similar escaping, which... normally it would, if not for the disagreement about +. Python's definitely wrong here, as + is one of the older "safe" characters to use in a URL.

@thermokarst
Copy link
Contributor

Maybe we should transfer this issue to q2-diversity, that way we can address the quoting behavior there?

@ebolyen
Copy link
Member

ebolyen commented Sep 29, 2021

Actually, my memory is stale, q2view no longer URI encodes: qiime2/q2view@ea899cc

@ebolyen
Copy link
Member

ebolyen commented Sep 29, 2021

Yeah perhaps, if q2view shouldn't do anything here.

It might make sense to attempt a search for the "python escaped" version of the file if we can't find it in the zip the first time. But I'm not sure if that's a good idea or a bad one.

@thermokarst
Copy link
Contributor

I'm good with q2view remaining unchanged here - we know there have been issues with the quoting of various visualizations in q2-diversity (at my hand), so I'm good with pointing the blame there, lol.

@ebolyen ebolyen transferred this issue from qiime2/q2view-old Sep 29, 2021
@cherman2 cherman2 added the good first issue Good for newcomers label Sep 19, 2023
@colinbrislawn
Copy link
Author

I'm closing this in favor of #345

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

No branches or pull requests

4 participants