Python Forum
Errors while running dash plotly code
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Errors while running dash plotly code
#1
Hello , I'm getting the following error while m running the below code in python shell directly, Can anyone please solve the problem:

# -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_html_components as html

app = dash.Dash()

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

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

dcc.Graph(
id='example-graph',
figure={
'data': [
{'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'},
{'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'},
],
'layout': {
'title': 'Dash Data Visualization'
}
}
)
])

if __name__ == "__main__":
app.run_server(debug=True)

Unexpected error:
/opt/python/2.7.10/linux50_32/bin/python: can't find '__main__' module in ''
----------------------------------------------------------------------------
Thanks in advance
Reply


Messages In This Thread
Errors while running dash plotly code - by Nischitha - Aug-23-2017, 05:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  running the code and seeing the GUI chriswrcg 1 854 May-19-2023, 04:49 PM
Last Post: deanhystad
  Updating/running code when path changes hermannhaf 14 3,301 Aug-05-2022, 09:37 PM
Last Post: woooee
  [PyQt] source code is not running in REDHAT 7 linux platform shridhara 0 2,145 May-23-2018, 07:58 AM
Last Post: shridhara

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020