震惊!html文件注释也会影响运行代码!(werkzeug.routing.BuildError: Could not build url for endpoint)莫名其妙
Posted Dontla
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了震惊!html文件注释也会影响运行代码!(werkzeug.routing.BuildError: Could not build url for endpoint)莫名其妙相关的知识,希望对你有一定的参考价值。
如图,报了个错,不明觉厉
D:\\20191031_tensorflow_yolov3\\python\\python.exe D:/20191031_tensorflow_yolov3/tensorflow-yolov3/app.py
2021-04-11 19:51:52.943471: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2021-04-11 19:51:53.214730: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.4175
pciBusID: 0000:03:00.0
totalMemory: 4.00GiB freeMemory: 3.29GiB
2021-04-11 19:51:53.214984: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1490] Adding visible gpu devices: 0
2021-04-11 19:51:54.135015: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-04-11 19:51:54.135142: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] 0
2021-04-11 19:51:54.135214: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0: N
2021-04-11 19:51:54.135425: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3007 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:03:00.0, compute capability: 6.1)
线程1启动成功
线程2启动成功
SaveVideo还没好:1618141914.2975879
线程3启动成功
* Serving Flask app "app" (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: off
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
[2021-04-11 19:51:55,160] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\_compat.py", line 39, in reraise
raise value
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "D:/20191031_tensorflow_yolov3/tensorflow-yolov3/app.py", line 204, in index
return render_template('index.html')
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\templating.py", line 140, in render_template
ctx.app,
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\templating.py", line 120, in _render
rv = template.render(context)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\jinja2\\asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\jinja2\\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\jinja2\\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\jinja2\\_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "D:\\20191031_tensorflow_yolov3\\tensorflow-yolov3\\templates\\index.html", line 74, in top-level template code
<!-- <source src=" url_for('video_feed') " type="video/mp4"> -->
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\helpers.py", line 370, in url_for
return appctx.app.handle_url_build_error(error, endpoint, values)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\app.py", line 2216, in handle_url_build_error
reraise(exc_type, exc_value, tb)
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\_compat.py", line 39, in reraise
raise value
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\flask\\helpers.py", line 358, in url_for
endpoint, values, method=method, force_external=external
File "D:\\20191031_tensorflow_yolov3\\python\\lib\\site-packages\\werkzeug\\routing.py", line 2020, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.BuildError: Could not build url for endpoint 'video_feed'. Did you mean 'videoo_feed' instead?
127.0.0.1 - - [11/Apr/2021 19:51:55] "GET / HTTP/1.1" 500 -
SaveVideo还没好:1618141915.2985861
SaveVideo还没好:1618141916.2990878
SaveVideo还没好:1618141917.2996097
SaveVideo还没好:1618141918.3001091
SaveVideo还没好:1618141919.3005903
Process finished with exit code -1
其中有一句:werkzeug.routing.BuildError: Could not build url for endpoint ‘video_feed’. Did you mean ‘videoo_feed’ instead?
再往上面看,说我这句代码出错,可是,我这句是注释啊!@@@@???
把注释删了,程序就能正常运行了
莫名其妙吧这是???
切换块注释也不行
以上是关于震惊!html文件注释也会影响运行代码!(werkzeug.routing.BuildError: Could not build url for endpoint)莫名其妙的主要内容,如果未能解决你的问题,请参考以下文章