質問編集履歴
2
コードブロックにしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,6 +41,8 @@
|
|
41
41
|
|
42
42
|
|
43
43
|
### ターミナルに表示されるエラー
|
44
|
+
|
45
|
+
```
|
44
46
|
|
45
47
|
Last login: Fri Nov 8 13:27:51 on ttys000
|
46
48
|
|
@@ -168,6 +170,8 @@
|
|
168
170
|
|
169
171
|
|
170
172
|
|
173
|
+
```
|
174
|
+
|
171
175
|
### 試したこと
|
172
176
|
|
173
177
|
|
1
ターミナルに出力されているエラーメッセージを記載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,11 +16,13 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
|
19
|
+
###ブラウザに表示されているもの
|
20
20
|
|
21
21
|
![![イメージ説明](8ad240a23cfa383b2baff43959604f91.png)](9a6616d4c8174186553f77bd8b9acdb7.png)
|
22
22
|
|
23
23
|
|
24
|
+
|
25
|
+
### ディレクトリ構成
|
24
26
|
|
25
27
|
ディレクトリ構成は下の画像のようになっています。
|
26
28
|
|
@@ -36,6 +38,136 @@
|
|
36
38
|
|
37
39
|
|
38
40
|
|
41
|
+
|
42
|
+
|
43
|
+
### ターミナルに表示されるエラー
|
44
|
+
|
45
|
+
Last login: Fri Nov 8 13:27:51 on ttys000
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
The default interactive shell is now zsh.
|
50
|
+
|
51
|
+
To update your account to use zsh, please run `chsh -s /bin/zsh`.
|
52
|
+
|
53
|
+
For more details, please visit https://support.apple.com/kb/HT208050.
|
54
|
+
|
55
|
+
(base) hiranohiroshidainoMacBook-Air:~ yudai$ cd desktop/work/flaskr_project
|
56
|
+
|
57
|
+
(base) hiranohiroshidainoMacBook-Air:flaskr_project yudai$ python server.py
|
58
|
+
|
59
|
+
* Serving Flask app "server" (lazy loading)
|
60
|
+
|
61
|
+
* Environment: production
|
62
|
+
|
63
|
+
WARNING: This is a development server. Do not use it in a production deployment.
|
64
|
+
|
65
|
+
Use a production WSGI server instead.
|
66
|
+
|
67
|
+
* Debug mode: on
|
68
|
+
|
69
|
+
* Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
|
70
|
+
|
71
|
+
* Restarting with stat
|
72
|
+
|
73
|
+
* Debugger is active!
|
74
|
+
|
75
|
+
* Debugger PIN: 216-702-687
|
76
|
+
|
77
|
+
127.0.0.1 - - [08/Nov/2019 13:43:38] "GET / HTTP/1.1" 500 -
|
78
|
+
|
79
|
+
Traceback (most recent call last):
|
80
|
+
|
81
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
|
82
|
+
|
83
|
+
return self.wsgi_app(environ, start_response)
|
84
|
+
|
85
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
|
86
|
+
|
87
|
+
response = self.handle_exception(e)
|
88
|
+
|
89
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
|
90
|
+
|
91
|
+
reraise(exc_type, exc_value, tb)
|
92
|
+
|
93
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
|
94
|
+
|
95
|
+
raise value
|
96
|
+
|
97
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
|
98
|
+
|
99
|
+
response = self.full_dispatch_request()
|
100
|
+
|
101
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
|
102
|
+
|
103
|
+
rv = self.handle_user_exception(e)
|
104
|
+
|
105
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
|
106
|
+
|
107
|
+
reraise(exc_type, exc_value, tb)
|
108
|
+
|
109
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
|
110
|
+
|
111
|
+
raise value
|
112
|
+
|
113
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
|
114
|
+
|
115
|
+
rv = self.dispatch_request()
|
116
|
+
|
117
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
|
118
|
+
|
119
|
+
return self.view_functions[rule.endpoint](**req.view_args)
|
120
|
+
|
121
|
+
File "/Users/yudai/Desktop/work/flaskr_project/server.py", line 9, in index
|
122
|
+
|
123
|
+
return render_template('index.html')
|
124
|
+
|
125
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/templating.py", line 138, in render_template
|
126
|
+
|
127
|
+
ctx.app.jinja_env.get_or_select_template(template_name_or_list),
|
128
|
+
|
129
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/jinja2/environment.py", line 869, in get_or_select_template
|
130
|
+
|
131
|
+
return self.get_template(template_name_or_list, parent, globals)
|
132
|
+
|
133
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/jinja2/environment.py", line 830, in get_template
|
134
|
+
|
135
|
+
return self._load_template(name, self.make_globals(globals))
|
136
|
+
|
137
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/jinja2/environment.py", line 804, in _load_template
|
138
|
+
|
139
|
+
template = self.loader.load(self, name, globals)
|
140
|
+
|
141
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/jinja2/loaders.py", line 113, in load
|
142
|
+
|
143
|
+
source, filename, uptodate = self.get_source(environment, name)
|
144
|
+
|
145
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/templating.py", line 60, in get_source
|
146
|
+
|
147
|
+
return self._get_source_fast(environment, template)
|
148
|
+
|
149
|
+
File "/Users/yudai/opt/anaconda3/lib/python3.7/site-packages/flask/templating.py", line 89, in _get_source_fast
|
150
|
+
|
151
|
+
raise TemplateNotFound(template)
|
152
|
+
|
153
|
+
jinja2.exceptions.TemplateNotFound: index.html
|
154
|
+
|
155
|
+
127.0.0.1 - - [08/Nov/2019 13:43:38] "GET /?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
|
156
|
+
|
157
|
+
127.0.0.1 - - [08/Nov/2019 13:43:38] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
|
158
|
+
|
159
|
+
127.0.0.1 - - [08/Nov/2019 13:43:38] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
|
160
|
+
|
161
|
+
127.0.0.1 - - [08/Nov/2019 13:43:38] "GET /?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
|
162
|
+
|
163
|
+
127.0.0.1 - - [08/Nov/2019 13:43:38] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
|
164
|
+
|
165
|
+
127.0.0.1 - - [08/Nov/2019 13:43:39] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
39
171
|
### 試したこと
|
40
172
|
|
41
173
|
|