我已经构建了一个单页的dash应用程序,当作为单个文件运行时,它可以按预期运行,但是当我试图将它作为一个完整的应用程序运行时,CSS无法正确加载。在
下面是我的文件夹结构
当我通过manage.py
加载整个应用程序时,我得到的错误是
Internal Server Error: /assets/internal.css
Traceback (most recent call last):
File "C:\Users\Tushar\Documents\serato_video_analyser\video_analyser\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\Tushar\Documents\serato_video_analyser\video_analyser\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\Tushar\Documents\serato_video_analyser\video_analyser\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\Tushar\Documents\serato_video_analyser\video_analyser\my_project\analyser_tool\views.py", line 32, in dash_index
return HttpResponse(dispatcher(request))
File "C:\Users\Tushar\Documents\serato_video_analyser\video_analyser\my_project\analyser_tool\views.py", line 27, in dispatcher
return response.get_data()
File "C:\Users\Tushar\Documents\serato_video_analyser\video_analyser\lib\site-packages\werkzeug\wrappers.py", line 986, in get_data
self._ensure_sequence()
File "C:\Users\Tushar\Documents\serato_video_analyser\video_analyser\lib\site-packages\werkzeug\wrappers.py", line 1035, in _ensure_sequence
raise RuntimeError('Attempted implicit sequence conversion '
RuntimeError: Attempted implicit sequence conversion but the response object is in direct passthrough mode.
这是我唯一的第二个dash应用程序,我正在工作,不幸的是没有太多的经验。如果有人能帮我解决这个问题,我真的很高兴。我已经挣扎了好几天了。在
提前多谢了!!在
通过持续的研究,我能够通过在我的服务器.py在
这个答案是以前回答过的,是从
https://community.plot.ly/t/serve-locally-option-with-additional-scripts-and-style-sheets/6974/6
相关问题 更多 >
编程相关推荐