震惊!html文件注释也会影响运行代码!(werkzeug.routing.BuildError: Could not build url for endpoint)莫名其妙
生活随笔
收集整理的這篇文章主要介紹了
震惊!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: productionWARNING: 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_appresponse = self.full_dispatch_request()File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\app.py", line 1952, in full_dispatch_requestrv = self.handle_user_exception(e)File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\app.py", line 1821, in handle_user_exceptionreraise(exc_type, exc_value, tb)File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\_compat.py", line 39, in reraiseraise valueFile "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\app.py", line 1950, in full_dispatch_requestrv = self.dispatch_request()File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\app.py", line 1936, in dispatch_requestreturn self.view_functions[rule.endpoint](**req.view_args)File "D:/20191031_tensorflow_yolov3/tensorflow-yolov3/app.py", line 204, in indexreturn render_template('index.html')File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\templating.py", line 140, in render_templatectx.app,File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\templating.py", line 120, in _renderrv = template.render(context)File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\jinja2\asyncsupport.py", line 76, in renderreturn original_render(self, *args, **kwargs)File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\jinja2\environment.py", line 1008, in renderreturn self.environment.handle_exception(exc_info, True)File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\jinja2\environment.py", line 780, in handle_exceptionreraise(exc_type, exc_value, tb)File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\jinja2\_compat.py", line 37, in reraiseraise 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_forreturn 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_errorreraise(exc_type, exc_value, tb)File "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\_compat.py", line 39, in reraiseraise valueFile "D:\20191031_tensorflow_yolov3\python\lib\site-packages\flask\helpers.py", line 358, in url_forendpoint, values, method=method, force_external=externalFile "D:\20191031_tensorflow_yolov3\python\lib\site-packages\werkzeug\routing.py", line 2020, in buildraise 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.3005903Process 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)莫名其妙的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 前端路由是什么?
- 下一篇: js中两个等号和三个等号区别?