# Issue Running in Pycharm Console

**URL:** <https://community.plotly.com/t/issue-running-in-pycharm-console/83334>\
**Category:** Dash Python\
**Created:** [March 25, 2024, 8:10pm UTC](https://community.plotly.com/t/issue-running-in-pycharm-console/83334 "2024-03-25T20:10:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nshah\_ft](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nshah\_ft](https://community.plotly.com/u/nshah_ft)\
**Post date:** [March 25, 2024, 8:10pm UTC](https://community.plotly.com/t/issue-running-in-pycharm-console/83334/1 "2024-03-25T20:10:49Z")

</div>

Hi, I’m trying to use the Pycharm debug console in order to run Dash apps. I’ve had success in the past while running Dash apps in the console, getting a result such as:

Dash is running on [http://127.0.0.1:8050/](http://127.0.0.1:8050/)

- Serving Flask app ‘app’
- Debug mode: on

This is what would be printed out when I select to “Run File in Python Console” through Pycharm.

I am currently setting up a brand-new system (without my old system to compare to), and running into an issue. When I run the following code;

```python
# Run this app with `python app.py` and
# visit http://127.0.0.1:8050/ in your web browser.

from dash import Dash, html, dcc
import plotly.express as px
import pandas as pd

app = Dash( __name__ )

# assume you have a "long-form" data frame
# see https://plotly.com/python/px-arguments/ for more options
df = pd.DataFrame({
    "Fruit": ["Apples", "Oranges", "Bananas", "Apples", "Oranges", "Bananas"],
    "Amount": [4, 1, 2, 2, 4, 5],
    "City": ["SF", "SF", "SF", "Montreal", "Montreal", "Montreal"]
})

fig = px.bar(df, x="Fruit", y="Amount", color="City", barmode="group")

app.layout = html.Div(children=[
    html.H1(children='Hello Dash'),

    html.Div(children='''
        Dash: A web application framework for your data.
    '''),

    dcc.Graph(
        id='example-graph',
        figure=fig
    )
])

if __name__ == ' __main__':
    app.run(debug=True)

```

(this is just some basic boilerplate code from the plotly website).

Running this code in the console I get the following result:  
\<IPython.lib.display.IFrame at 0x1c75fbffe50\>

The code terminates after printing out this one line. Running through the terminal or running in a Anaconda shell, I get the expected behavior of the code starting out as expected, but for some reason running in the console is giving me an issue. I haven’t gotten this issue running in the console in the past, so I believe there should be a way to fix it.

I am using the most up to date Dash version.

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [March 27, 2024, 5:54pm UTC](https://community.plotly.com/t/issue-running-in-pycharm-console/83334/2 "2024-03-27T17:54:50Z")

</div>

Hey @nshah_ft welcome to the forums.

Hard to tell, maybe the Pycharm version? I never had any problems with Pycharm, currently I’m using PyCharm 2022.2.1 (Community Edition).

---

<div class="post-metadata">

**Author:** ![nshah\_ft](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nshah\_ft](https://community.plotly.com/u/nshah_ft)\
**Post date:** [March 27, 2024, 6:31pm UTC](https://community.plotly.com/t/issue-running-in-pycharm-console/83334/3 "2024-03-27T18:31:22Z")

</div>

No unfortunately not. I downgraded to this version but it still didn’t work. I’m curious what exactly is being printed?

\<IPython.lib.display.IFrame at 0x1c75fbffe50\>

The python code isn’t failing with any errors. I don’t really see any documentation on this type of “IFrame” so i’m confused what it could be.

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [March 27, 2024, 6:32pm UTC](https://community.plotly.com/t/issue-running-in-pycharm-console/83334/4 "2024-03-27T18:32:28Z")

</div>

Have you setup an interpreter for the app?

---

<div class="post-metadata">

**Author:** ![nshah\_ft](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nshah\_ft](https://community.plotly.com/u/nshah_ft)\
**Post date:** [March 27, 2024, 6:34pm UTC](https://community.plotly.com/t/issue-running-in-pycharm-console/83334/5 "2024-03-27T18:34:11Z")

</div>

Hi, yes I have. I don’t believe the code would execute at all if there was no interpreter set up.

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [March 27, 2024, 6:38pm UTC](https://community.plotly.com/t/issue-running-in-pycharm-console/83334/6 "2024-03-27T18:38:40Z")

</div>

Hmm, perhaps trying again with a new interpreter, dont inherit anything.
