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

Empty cells in numeric metadata column causing error with viewing feature-table.qzv #259

Closed
cherman2 opened this issue Sep 2, 2022 · 0 comments · Fixed by #260
Closed
Projects

Comments

@cherman2
Copy link
Contributor

cherman2 commented Sep 2, 2022

Bug Description
There is a "SyntaxError: JSON.parse: unexpected character at line 2 column 41185 of the JSON data" in q2-view on the interactive sample detail tab.

I inspected the webpage and found this console error: Query.Deferred exception: JSON.parse: unexpected character at line 2 column 41185 of the JSON data @https://view.qiime2.org/_/tzxmdl1o9jo/597ab77e-f75a-43b9-8726-cfb6d6b00bcb/data/sample-frequency-detail.html:131:21
j@https://view.qiime2.org/_/tzxmdl1o9jo/597ab77e-f75a-43b9-8726-cfb6d6b00bcb/data/q2templateassets/js/jquery-3.2.0.min.js:2:29999
Deferred/then/g/</k<@https://view.qiime2.org/_/tzxmdl1o9jo/597ab77e-f75a-43b9-8726-cfb6d6b00bcb/data/q2templateassets/js/jquery-3.2.0.min.js:2:30313
undefined
Screen Shot 2022-09-02 at 2 29 57 PM

I also received the same error on chrome with a different error: Uncaught SyntaxError: Unexpected token 'N', ..."atitude": NaN, "Long"... is not valid JSON. This error ended up being more helpful in pinpointing the reason behind the error.
Screen Shot 2022-09-02 at 3 29 26 PM

This error occurs when you summarize a feature table in QIIME2-2022.8 and the qiime2-dev env and view it with qiime2 view, however it does not occur when summarized in 2022.2.

its seems that 2022.8 uses Nan in the sample-frequency-detail.html for blank cells in numeric metadata columns and null in categorical metadata columns while 2022.2 only uses null

2022.8: This a screenshot from my metadata. Weather condition is categorical and Null while Latitude is numeric and Nan.
Screen Shot 2022-09-02 at 3 39 37 PM

2022.2: Both are null.

Screen Shot 2022-09-02 at 3 44 28 PM

Steps to reproduce the behavior

  1. Have metadata that has blank cells in a numeric column
  2. activate qiime2-2022.8 env
  3. run qiime feature-table summarize with metadata
  4. run qiime tools view or drag and drop .qzv into view.qiime2.org
  5. click on Interactive Sample Details
  6. see error

Expected behavior
The expected behavior is to be able to see the interactive quality plot but instead there is an error.

Computation Environment

  • OS: macOS Catalina
  • QIIME 2 Release 2022.8 and the most recent qiime2-dev
  • Firefox v104.0.1 (64-bit)

Thanks @Oddant1 and @lizgehret for the help debugging this!

@lizgehret lizgehret linked a pull request Sep 6, 2022 that will close this issue
@lizgehret lizgehret added this to Backlog in 2022.11 via automation Sep 6, 2022
@lizgehret lizgehret moved this from Backlog to Changelog Needed in 2022.11 Sep 6, 2022
@Oddant1 Oddant1 moved this from Changelog Needed to Completed in 2022.11 Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2022.11
  
Completed
Development

Successfully merging a pull request may close this issue.

1 participant