Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\Python\Python38\lib\site-packages\fitz\__init__.py", line 1, in <module> from frontend import * File "D:\Python\Python38\lib\site-packages\frontend\__init__.py", line 1, in <module> from .events import * File "D:\Python\Python38\lib\site-packages\frontend\events\__init__.py", line 1, in <module> from .clipboard import * File "D:\Python\Python38\lib\site-packages\frontend\events\clipboard.py", line 2, in <module> from ..dom import Event File "D:\Python\Python38\lib\site-packages\frontend\dom.py", line 439, in <module> from . import dispatcher File "D:\Python\Python38\lib\site-packages\frontend\dispatcher.py", line 15, in <module> from . import config, server File "D:\Python\Python38\lib\site-packages\frontend\server.py", line 24, in <module> app.mount(config.STATIC_ROUTE, StaticFiles(directory=config.STATIC_DIRECTORY), name=config.STATIC_NAME) File "D:\Python\Python38\lib\site-packages\starlette\staticfiles.py", line 57, in __init__ raise RuntimeError(f"Directory '{directory}' does not exist") RuntimeError: Directory 'static/' does not exist
时间: 2023-07-21 16:48:38 浏览: 220
【Python入门自学笔记专辑】——Python异常处理
这个错误是运行 Python 代码时,无法找到静态文件目录 'static/' 引起的。可能是你的代码中使用了静态文件,但是没有在正确的位置创建 'static/' 目录,或者你的当前工作目录不正确,导致找不到这个目录。你需要检查代码中的相关路径是否正确,或者创建一个名为 'static/' 的目录。
阅读全文