-
Notifications
You must be signed in to change notification settings - Fork 39
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
ModuleNotFoundError: No module named 'pages.' #113
Comments
This issue is resolved after upgrading dash to 2.5 and following suggestions in earlier issue#112 |
However Now I am getting ' Duplicate callback Outputs' for every callback although there is no duplicate Output exits. Error:
histogram.py file:from dash import Dash, dcc, html, Input, Output, callback
from dash import register_page
import plotly.express as px
import numpy as np
register_page(__name__)
np.random.seed(2020)
layout = html.Div(
[
dcc.Graph(id="istograms-graph"),
html.P("Mean:"),
dcc.Slider(
id="histograms-mean", min=-3, max=3, value=0, marks={-3: "-3", 3: "3"}
),
html.P("Standard Deviation:"),
dcc.Slider(id="histograms-std", min=1, max=3, value=1, marks={1: "1", 3: "3"}),
]
)
@callback(
Output("histograms-graph", "figure"),
Input("histograms-mean", "value"),
Input("histograms-std", "value"),
)
def display_color(mean, std):
data = np.random.normal(mean, std, size=500)
fig = px.histogram(data, nbins=30, range_x=[-10, 10])
return fig |
import dash
import dash_bootstrap_components as dbc
app = dash.Dash(
__name__, use_pages=True, external_stylesheets=[dbc.themes.BOOTSTRAP]
)
navbar = dbc.NavbarSimple(
dbc.DropdownMenu(
[
dbc.DropdownMenuItem(page["name"], href=page["path"])
for page in dash.page_registry.values()
if page["module"] != "pages.not_found_404"
],
nav=True,
label="More Pages",
),
brand="Multi Page App Plugin Demo",
color="primary",
dark=True,
className="mb-2",
)
app.layout = dbc.Container(
[navbar, dash.page_container],
fluid=True,
)
if __name__ == "__main__":
app.run_server(debug=True) |
HI @charmeem |
Yes I am using Windows. |
Hi @charmeem 5.1 was just released 🎊 Could you try running these multi-page sample apps and let me know how it goes?: https://github.com/AnnMarieW/dash-multi-page-app-demos |
Hello, Secondly when I add a page 'heatmaps.py' in the /pages folder following error appears:Exception Traceback (most recent call last) |
🤔 So, you see these errors when you run one of the apps from the github repo I shared the link to previously? |
can you share the code you are running? It looks like there might be conflicts between "Histogram" and "Histogram-checkpoint" for example |
wait |
Yes I am running codes in multi_page_example_1 |
app.py
|
This looks odd:
Do you know where |
histogram.py
|
It is now working. Let me test with heatmaps.py page as well. |
All working now, Thanks for your hints. |
oh, great - thanks! Now we'll know what to do for the next person who might have a similar issue 👍 |
Can I close the case? |
yes, please |
OK, appreciate the work you are doing designing this wonderful product, keep it up ! |
Hi. Please am trying to deploy my link to render. But am getting errors: dash.exceptions.NoLayoutException: The layout was |
Hi @Damistar05 - If you can post your code and your question on https://community.plotly.com/ there are lots of folks who will be happy to help! |
Hi @Damistar05 - please don't use this version - this was a prototype used to develop the Dash Pages feature and is no longer being maintained. This feature is now part of Dash :-) |
When trying to run the demo code of Chapter08-MultiPageDashApp I am getting this error.
This error however doesn't generates if I include only histogram.py file in /pages folder.
As I add other files like bar_charts.py this error appears.
Detail print out:
The text was updated successfully, but these errors were encountered: