Dash_docs.utils ModuleNotFoundError: No module named 'dash_docs'

I am trying to run the sequence viewer locally. SequenceViewer | Dash for Python Documentation | Plotly

The line is
from dash_docs.utils import DatasetLoader

I have tried pip install dash_docs with no luck.
I can’t find any reference to dash_docs or DatasetLoader in the docs.

This is the repository for dash_docs: dash-docs/dash_docs at master · plotly/dash-docs · GitHub

It is used to generate the documentation app, including the link that you sent… So it would make more sense not to use this class in an example (could be a good PR).

Hi @gfisch and welcome to the Dash community :slight_smile:

Thanks for reporting! This is being fixed and you should see an update to the documentation sometime this week.

Hi @gfisch,

Thanks for bringing this to our attention. We hope to resolve it soon. In the meantime, to view dashbio SequencerViewer - I’ve made a google colab that takes in an example file from NCBI.

Let me know if this helps or if you have any future questions!

  • Emilie
2 Likes

Hi @gfisch, we’ve updated the docs page. Can you try again and let us know how it goes? :slight_smile:

Thanks for all the efforts!

Running the code now brings me the error
The dash_html_components package is deprecated. Please replace
import dash_html_components as html with from dash import html
import dash_html_components as html
Traceback (most recent call last):
File “/var/www/html/p2abc/dash/seq-viewer1.py”, line 19, in
fasta_str = fasta_str.decode(‘utf-8’)
AttributeError: ‘str’ object has no attribute ‘decode’

I replaced import dash_html_components as html with from dash import html
I see the fasta_str already has decode in the urlopen call:

fasta_str = urlreq.urlopen(
https://raw.githubusercontent.com/plotly/dash-bio-docs-files/master/sequence_viewer_P01308.fasta
).read().decode(‘utf-8’)

If I comment out the further call to decode it all works.
#if PY3:

fasta_str = fasta_str.decode(‘utf-8’)

Thanks for all your feedback, we will update the docs with your notes!
I’m glad you have it working now – if anything else occurs, please let us know!