前提・実現したいこと
ここに質問の内容を詳しく書いてください。
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
作成されたアドレス(http://127.0.0.1:8050/)にアクセスすると、
よくわからない標示がされる。
エラーメッセージ
Running on http://127.0.0.1:8050/
Debugger PIN: 930-700-505
- Serving Flask app "sakai" (lazy loading)
- Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead. - Debug mode: on
Running on http://127.0.0.1:8050/
Debugger PIN: 036-640-679
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packag
es/flask/app.py", line 2463, in call
return self.wsgi_app(environ, start_response)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packag
長いので抜粋。
該当のソースコード
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import pandas as pd
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(name,external_stylesheets=external_stylesheets)
df = pd.read_csv('motivartions.csv')
app.Layout = html.Div(children=[
html.H1(
children='今日のモチベーションの変化',
style = {
'textAlign':'center',
'color':'black'
}
),
dcc.Graph(
id='exsample-graph',
figure = {
'data':[
go.Scatter(
x = df['times'],
y = df['motivartions'],
mode = 'lines',
opacity=0.7,
marker = {
'size':10,
'color':'blue'
},
name='今日のモチベーション'
)
],
'layout':go.Layout(
xaxis={'title':'時刻'},
yaxis={'title':'モチベーション'},
) } ), html.H2( children= '今日の日付', style = { 'textAlign':'black', 'color':'black' } )
])
if name=='main':
app.run_server(debug=True)
どこが間違えているのか一通り見てみましたがわかりません、、、
追記
time = datetime.datetime.strftime('%Y/%m/%d')
html,div(
children='time'
style ={
'color':'red',
}
)
このようにdatetimeから時間を持って来て、
children=''で表示させる事はできますか?
ソースコード
試したこと
カンマの確認、データの確認
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。