Pycharm occasionally not running multipage app?


I have been using Pycharm as an IDE to create Dash apps but have been running into issues with Dash Pages and Pycharm. Most times, the app runs fine and a flask server is created when I initially run the app. However, sometimes when I try to run a multipage app, Pycharm does not create a flask server and does not produce any error message. After reinstalling Pycharm running the app works great for a few days but then this issue arises again. Has anyone else faced this problem or know a way to fix this?

Hello @NiBk,

That is a really broad statement.

Can you offer some clarification?

  • Are you running your app in production mode or editing and initializing each day?
  • Do you run it in debug mode?
  • Do you have a screenshot of what PyCharm is showing when it initializes with no flask server and no pages?

I haven’t run into the issue that you’ve described before.

Right now, I am continuing to edit and initialize the app every day. I have tried running in debug mode as well and face the same issue. And this is what PyCharm produces:

Is it possible to see your code of how you are initializing?

Those errors you see can be fixed by following their suggestion of:

from dash import html

And remove the import of dash_html_colponents

The server doesn’t complete initialization, or takes a very long time. Changing that line might help you.

Also, what Dash version are you running?

My code already uses dash import html. That issue is in the dash_bootstrap_components plugin so there isn’t much I can do. I am using 2.5.1 but I am updating Dash now.

Update your bootstrap as well, if it doesn’t update too.

After updating both, Pycharm does not produce any messages but continues to run without initializing a server. I’ll keep on looking for a fix.

For anyone else facing this issue, I deleted a folder named ~arkupsafe that was in my venv/Lib/site-packages folder. It seems to be a corrupted folder for the plugin markupsafe