Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start后进不去server,log显示有报错 #18

Open
yuyun2000 opened this issue Nov 20, 2024 · 40 comments
Open

start后进不去server,log显示有报错 #18

yuyun2000 opened this issue Nov 20, 2024 · 40 comments

Comments

@yuyun2000
Copy link

serve.log最后的输出如下:

| |                     'print_verbose': False,                             | |
| |                     'text_score': 0.5,                                  | |
| |                     'use_cls': True,                                    | |
| |                     'use_det': True,                                    | |
| |                     'use_rec': True,                                    | |
| |                     'use_space_char': True,                             | |
| |                     'width_height_ratio': 40                            | |
| |                 }                                                       | |
| |        kwargs = {}                                                      | |
| |          self = <rapidocr_openvino.main.RapidOCR object at              | |
| |                 0x00000127C4291840>                                     | |
| +-------------------------------------------------------------------------+ |
+-----------------------------------------------------------------------------+
KeyError: 'max_side_len'

watch.log报错如下:

Failed to retrieve libraries: 502 - 
@yuyun2000
Copy link
Author

更新0.19后,好像可以进行ocr识别了,但是embedding我已经设置了从modelscope下载,为啥日志里还是有huggingface的下载失败记录

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

修改配置后需要 memos stop && memos start 重启一下才生效~

@yuyun2000
Copy link
Author

现在依旧进不去ui界面,但是不是前面的连不上,而是空白界面

@yuyun2000
Copy link
Author

而且我确定了,就算我 use_modelscope: true 他还是会不断尝试从hug下载,导致log信息很多

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

发个报错信息看看?

@yuyun2000
Copy link
Author

watch.log报错如下:

Failed to retrieve libraries: 502 -
始终只有这一行
serve的信息如下:

2024-11-20 12:12:33,373 - ERROR - Error updating indexes for entity 258: [WinError 4392] 在重分析点缓冲区中的数据无效。: '..\\..\\blobs\\823d01be739976929f1de49c19ba4eec80e604cf' -> 'C:\\Users\\Administrator\\.cache\\huggingface\\hub\\models--jinaai--jina-bert-implementation\\snapshots\\f3ec4cf7de7e561007f27c9efc7148b0bd713f81\\configuration_bert.py'
2024-11-20 12:12:33,375 - INFO - 127.0.0.1:6625 - "POST /libraries/1/entities?update_index=true HTTP/1.1" 500
2024-11-20 12:12:33,375 - ERROR - Exception in ASGI application
Traceback (most recent call last):
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 406, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\applications.py", line 113, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\middleware\errors.py", line 187, in __call__
    raise exc
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\middleware\cors.py", line 85, in __call__
    await self.app(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\starlette\routing.py", line 73, in app
    response = await f(request)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\fastapi\routing.py", line 301, in app
    raw_response = await run_endpoint_function(
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\fastapi\routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\memos\server.py", line 227, in new_entity
    crud.update_entity_index(entity, db)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\memos\crud.py", line 755, in update_entity_index
    embeddings = get_embeddings([vec_metadata])
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\memos\embedding.py", line 63, in get_embeddings
    embeddings = generate_embeddings(texts)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\memos\embedding.py", line 45, in generate_embeddings
    init_embedding_model()
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\memos\embedding.py", line 36, in init_embedding_model
    model = SentenceTransformer(model_dir, trust_remote_code=True)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\sentence_transformers\SentenceTransformer.py", line 308, in __init__
    modules, self.module_kwargs = self._load_sbert_model(
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\sentence_transformers\SentenceTransformer.py", line 1728, in _load_sbert_model
    module = module_class(model_name_or_path, cache_dir=cache_folder, backend=self.backend, **kwargs)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\sentence_transformers\models\Transformer.py", line 77, in __init__
    config = self._load_config(model_name_or_path, cache_dir, backend, config_args)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\sentence_transformers\models\Transformer.py", line 128, in _load_config
    return AutoConfig.from_pretrained(model_name_or_path, **config_args, cache_dir=cache_dir)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\transformers\models\auto\configuration_auto.py", line 1026, in from_pretrained
    config_class = get_class_from_dynamic_module(
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\transformers\dynamic_module_utils.py", line 540, in get_class_from_dynamic_module
    final_module = get_cached_module_file(
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\transformers\dynamic_module_utils.py", line 344, in get_cached_module_file
    resolved_module_file = cached_file(
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\transformers\utils\hub.py", line 403, in cached_file
    resolved_file = hf_hub_download(
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\huggingface_hub\file_download.py", line 862, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\huggingface_hub\file_download.py", line 994, in _hf_hub_download_to_cache_dir
    _create_symlink(blob_path, pointer_path, new_blob=False)
  File "C:\ProgramData\anaconda3\envs\tor2\lib\site-packages\huggingface_hub\file_download.py", line 586, in _create_symlink
    os.symlink(src_rel_or_abs, abs_dst)
OSError: [WinError 4392] 在重分析点缓冲区中的数据无效。: '..\\..\\blobs\\823d01be739976929f1de49c19ba4eec80e604cf' -> 'C:\\Users\\Administrator\\.cache\\huggingface\\hub\\models--jinaai--jina-bert-implementation\\snapshots\\f3ec4cf7de7e561007f27c9efc7148b0bd713f81\\configuration_bert.py'
2024-11-20 12:12:34,346 - INFO - 127.0.0.1:6651 - "GET /libraries/1/folders/1/entities?limit=100&offset=0 HTTP/1.1" 200
2024-11-20 12:12:35,202 - INFO - 127.0.0.1:6657 - "GET /libraries/1/folders/1/entities?limit=100&offset=100 HTTP/1.1" 200
2024-11-20 12:12:36,017 - INFO - 127.0.0.1:6659 - "GET /libraries/1/folders/1/entities?limit=100&offset=200 HTTP/1.1" 200
2024-11-20 12:12:36,786 - INFO - 127.0.0.1:6665 - "GET /libraries/1/folders/1/entities?limit=100&offset=300 HTTP/1.1" 200
2024-11-20 12:14:49,644 - INFO - 127.0.0.1:7086 - "GET / HTTP/1.1" 200
2024-11-20 12:14:49,663 - INFO - 127.0.0.1:7086 - "GET /_app/immutable/entry/start.4362bce6.js HTTP/1.1" 304
2024-11-20 12:14:49,672 - INFO - 127.0.0.1:7086 - "GET /_app/immutable/chunks/scheduler.5c1cff6e.js HTTP/1.1" 304
2024-11-20 12:14:49,675 - INFO - 127.0.0.1:7087 - "GET /_app/immutable/chunks/singletons.c09a1307.js HTTP/1.1" 304
2024-11-20 12:14:49,676 - INFO - 127.0.0.1:7090 - "GET /_app/immutable/chunks/index.5c08976b.js HTTP/1.1" 304
2024-11-20 12:14:49,677 - INFO - 127.0.0.1:7091 - "GET /_app/immutable/entry/app.3dfd6829.js HTTP/1.1" 304
2024-11-20 12:14:49,679 - INFO - 127.0.0.1:7092 - "GET /_app/immutable/chunks/index.60ee613b.js HTTP/1.1" 304
2024-11-20 12:14:49,712 - INFO - 127.0.0.1:7092 - "GET /favicon.png HTTP/1.1" 200
2024-11-20 12:14:51,036 - INFO - 127.0.0.1:7092 - "GET / HTTP/1.1" 200

刷新了非常多,web界面进去啥也没有,重启后serve信息如下:

Database initialized successfully at C:\Users\Administrator\.memos\database.db
2024-11-20 12:16:22,304 - INFO - Database path: C:\Users\Administrator\.memos\database.db
2024-11-20 12:16:22,304 - INFO - VLM plugin enabled: modelname='minicpm-v' endpoint='http://localhost:11434' token='' concurrency=8 force_jpeg=True prompt='请帮描述这个图片中的内容,包括画面格局、出现的视觉元素等'
2024-11-20 12:16:22,304 - INFO - OCR plugin enabled: endpoint='http://localhost:5555/predict' token='' concurrency=8 use_local=True force_jpeg=False
2024-11-20 12:16:22,305 - INFO - VLM plugin initialized
2024-11-20 12:16:22,305 - INFO - Model Name: minicpm-v
2024-11-20 12:16:22,305 - INFO - Endpoint: http://localhost:11434
2024-11-20 12:16:22,305 - INFO - Token: 
2024-11-20 12:16:22,305 - INFO - Concurrency: 8
2024-11-20 12:16:22,305 - INFO - Force JPEG: True
2024-11-20 12:16:22,305 - INFO - Prompt: 请帮描述这个图片中的内容,包括画面格局、出现的视觉元素等
2024-11-20 12:16:25,678 - INFO - OCR plugin initialized
2024-11-20 12:16:25,678 - INFO - Endpoint: http://localhost:5555/predict
2024-11-20 12:16:25,678 - INFO - Token: 
2024-11-20 12:16:25,678 - INFO - Concurrency: 8
2024-11-20 12:16:25,678 - INFO - Use local: True
2024-11-20 12:16:27,694 - INFO - OCR library: rapidocr_openvino
2024-11-20 12:16:27,725 - INFO - Started server process [17232]
2024-11-20 12:16:27,725 - INFO - Waiting for application startup.
2024-11-20 12:16:27,725 - INFO - Application startup complete.
2024-11-20 12:16:27,726 - INFO - Uvicorn running on http://0.0.0.0:23323 (Press CTRL+C to quit)
2024-11-20 12:16:28,856 - INFO - 127.0.0.1:7379 - "GET / HTTP/1.1" 200
2024-11-20 12:16:30,461 - INFO - 127.0.0.1:7379 - "GET / HTTP/1.1" 200
2024-11-20 12:16:31,299 - INFO - 127.0.0.1:7379 - "GET / HTTP/1.1" 200

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

请再提供下 memos config 的输出吧

@taliove
Copy link

taliove commented Nov 20, 2024

image 一样遇到这个问题。在macOS上。 我改了端口也不行。 配置均为默认下。

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

image 一样遇到这个问题。在macOS上。 我改了端口也不行。 配置均为默认下。

你好,感谢尝试这个项目。看起来是没有成功下载模型导致的,这里麻烦将 ~/.memos/config.yamlembedding.use_modelscope 设置为 true 并重启一下试试看

@yuyun2000
Copy link
Author

config如下:

base_dir: ~/.memos
database_path: database.db
default_library: screenshots
screenshots_dir: screenshots

server_host: 0.0.0.0
server_port: 23323

# Enable authentication by uncommenting the following lines
# auth_username: admin
# auth_password: admin

default_plugins:
- builtin_ocr
# - builtin_vlm

# using ollama as the vlm server
# vlm:
#   concurrency: 8
#   endpoint: http://localhost:11434
#   force_jpeg: true
#   modelname: minicpm-v
#   prompt: 请帮描述这个图片中的内容,包括画面格局、出现的视觉元素等
#   token: ''

# using local ocr
ocr:
  concurrency: 8
  # this is not used if use_local is true
  endpoint: http://localhost:5555/predict
  force_jpeg: false
  token: ''
  use_local: true
  use_modelscope: true

# using local embedding
embedding:
  # this is not used if use_local is true
  endpoint: http://localhost:11434/api/embed
  model: jinaai/jina-embeddings-v2-base-zh
  num_dim: 768
  use_local: true
  use_modelscope: true

# using ollama embedding
# embedding:
#   endpoint: http://localhost:11434/api/embed # this is not used
#   model: arkohut/gte-qwen2-1.5b-instruct:q8_0
#   num_dim: 1536
#   use_local: false
#   use_modelscope: false

record_interval: 4 # seconds

你看我已经关掉了vlm,但是上面的log信息还是开了vlm

@taliove
Copy link

taliove commented Nov 20, 2024

image 一样遇到这个问题。在macOS上。 我改了端口也不行。 配置均为默认下。

你好,感谢尝试这个项目。看起来是没有成功下载模型导致的,这里麻烦将 ~/.memos/config.yamlembedding.use_modelscope 设置为 true 并重启一下试试看

谢谢您的回复。改了后,仍然不行。配置与这个本issue作者的一致。

我的错误基本上为:
ImportError: cannot import name 'DeclarativeBase' from 'sqlalchemy.orm'

@yuyun2000
Copy link
Author

image
改成原始端口后,并且使用其他浏览器依然访问不了,而且都是只加载了图标,页面一片空白

@noonisy
Copy link

noonisy commented Nov 20, 2024

你可以使用memos ps,看看当前已经启动的服务(正常是三个都启动,serve record watch)。同时,发现如果开着代理,可能会影响watch命令运行,同样报错Failed to retrieve libraries: 502 -

@yuyun2000
Copy link
Author

代理关掉后,watch依然启动不了:

$ memos ps
Name    Status       PID    Started At           Running For
serve   Running      5364   2024-11-20 13:56:52  0:00:10
watch   Not Running  -      -                    -
record  Running      30640  2024-11-20 13:56:52  0:00:10

@noonisy
Copy link

noonisy commented Nov 20, 2024

launch.bat中设置了,timeout /t 15 /nobreak >nulwatch需要15秒后执行
Snipaste_2024-11-20_14-00-54

@yuyun2000
Copy link
Author

yuyun2000 commented Nov 20, 2024

完全关闭代理后,三个进程都正常运行:

memos ps
Name    Status      PID  Started At           Running For
serve   Running   25272  2024-11-20 14:02:01  0:02:20
watch   Running   27932  2024-11-20 14:02:16  0:02:05
record  Running   29368  2024-11-20 14:02:01  0:02:20

但是有个问题,我依然进不去ui界面

serve日志下有很多404:

2024-11-20 14:06:35,180 - INFO - 127.0.0.1:14507 - "POST /libraries/1/entities?trigger_webhooks_flag=false&update_index=true HTTP/1.1" 200
2024-11-20 14:06:38,848 - INFO - 127.0.0.1:14509 - "GET /libraries/1 HTTP/1.1" 200
2024-11-20 14:06:39,476 - INFO - 127.0.0.1:14511 - "GET /libraries/1/entities/by-filepath?filepath=C%3A%5CUsers%5CAdministrator%5C.memos%5Cscreenshots%5C20241120%5Cscreenshot-20241120-140632-of-monitor_2.webp HTTP/1.1" 404
2024-11-20 14:06:40,120 - INFO - 127.0.0.1:14514 - "POST /libraries/1/entities?trigger_webhooks_flag=false&update_index=true HTTP/1.1" 200
2024-11-20 14:06:43,840 - INFO - 127.0.0.1:14517 - "GET /libraries/1 HTTP/1.1" 200
2024-11-20 14:06:44,484 - INFO - 127.0.0.1:14519 - "GET /libraries/1/entities/by-filepath?filepath=C%3A%5CUsers%5CAdministrator%5C.memos%5Cscreenshots%5C20241120%5Cscreenshot-20241120-140638-of-monitor_2.webp HTTP/1.1" 404
2024-11-20 14:06:45,201 - INFO - 127.0.0.1:14521 - "POST /libraries/1/entities?trigger_webhooks_flag=false&update_index=true HTTP/1.1" 200

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

完全关闭代理后,三个进程都正常运行:

memos ps
Name    Status      PID  Started At           Running For
serve   Running   25272  2024-11-20 14:02:01  0:02:20
watch   Running   27932  2024-11-20 14:02:16  0:02:05
record  Running   29368  2024-11-20 14:02:01  0:02:20

但是有个问题,我依然进不去ui界面

image 一样遇到这个问题。在macOS上。 我改了端口也不行。 配置均为默认下。

你好,感谢尝试这个项目。看起来是没有成功下载模型导致的,这里麻烦将 ~/.memos/config.yamlembedding.use_modelscope 设置为 true 并重启一下试试看

谢谢您的回复。改了后,仍然不行。配置与这个本issue作者的一致。

我的错误基本上为: ImportError: cannot import name 'DeclarativeBase' from 'sqlalchemy.orm'

应该是 sqlalchemy 的版本问题:

pip install --upgrade sqlalchemy

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

完全关闭代理后,三个进程都正常运行:

memos ps
Name    Status      PID  Started At           Running For
serve   Running   25272  2024-11-20 14:02:01  0:02:20
watch   Running   27932  2024-11-20 14:02:16  0:02:05
record  Running   29368  2024-11-20 14:02:01  0:02:20

但是有个问题,我依然进不去ui界面

serve日志下有很多404:

2024-11-20 14:06:35,180 - INFO - 127.0.0.1:14507 - "POST /libraries/1/entities?trigger_webhooks_flag=false&update_index=true HTTP/1.1" 200
2024-11-20 14:06:38,848 - INFO - 127.0.0.1:14509 - "GET /libraries/1 HTTP/1.1" 200
2024-11-20 14:06:39,476 - INFO - 127.0.0.1:14511 - "GET /libraries/1/entities/by-filepath?filepath=C%3A%5CUsers%5CAdministrator%5C.memos%5Cscreenshots%5C20241120%5Cscreenshot-20241120-140632-of-monitor_2.webp HTTP/1.1" 404
2024-11-20 14:06:40,120 - INFO - 127.0.0.1:14514 - "POST /libraries/1/entities?trigger_webhooks_flag=false&update_index=true HTTP/1.1" 200
2024-11-20 14:06:43,840 - INFO - 127.0.0.1:14517 - "GET /libraries/1 HTTP/1.1" 200
2024-11-20 14:06:44,484 - INFO - 127.0.0.1:14519 - "GET /libraries/1/entities/by-filepath?filepath=C%3A%5CUsers%5CAdministrator%5C.memos%5Cscreenshots%5C20241120%5Cscreenshot-20241120-140638-of-monitor_2.webp HTTP/1.1" 404
2024-11-20 14:06:45,201 - INFO - 127.0.0.1:14521 - "POST /libraries/1/entities?trigger_webhooks_flag=false&update_index=true HTTP/1.1" 200

这个 404 是正常的,就是先检查文件是否存在~从这个日志来看你的服务已经运行起来了的~

@yuyun2000
Copy link
Author

yuyun2000 commented Nov 20, 2024

文件都是有的,db也在增长,但是就是进不去webui...

这可咋办啊,这剩下临门一脚比跑了一半还难受啊

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

文件都是有的,db也在增长,但是就是进不去webui...

这可咋办啊,这剩下临门一脚比跑了一半还难受啊

在命令行执行 curl localhost:23323 看看是否有返回。

如果确认有的话就换个浏览器试试看吧~

@yuyun2000
Copy link
Author

有返回的,为啥chrome不显示呢:

curl localhost:8839
Warning: ignoring SSL_CERT_DIR environment variable, not supported by libcurl
<!DOCTYPE html>
<html lang="en">
        <head>
                <meta charset="utf-8" />
                <link rel="icon" href="/favicon.png" />
                <meta name="viewport" content="width=device-width, initial-scale=1" />

                <link rel="modulepreload" href="/_app/immutable/entry/start.4362bce6.js">
                <link rel="modulepreload" href="/_app/immutable/chunks/scheduler.5c1cff6e.js">
                <link rel="modulepreload" href="/_app/immutable/chunks/singletons.c09a1307.js">
                <link rel="modulepreload" href="/_app/immutable/chunks/index.5c08976b.js">
                <link rel="modulepreload" href="/_app/immutable/entry/app.3dfd6829.js">
                <link rel="modulepreload" href="/_app/immutable/chunks/index.60ee613b.js">
        </head>
        <body data-sveltekit-preload-data="hover">
                <div style="display: contents">
                        <script>
                                {
                                        __sveltekit_f8rk1j = {
                                                base: "",
                                                env:

@noonisy
Copy link

noonisy commented Nov 20, 2024

F12看看控制台?试试访问http://localhost:8839/search?q=,应该返回当前所有data

@yuyun2000
Copy link
Author

yuyun2000 commented Nov 20, 2024

控制台输出如下:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.Understand this errorAI
scheduler.5c1cff6e.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.Understand this errorAI
singletons.c09a1307.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.Understand this errorAI
index.5c08976b.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.Understand this errorAI
app.3dfd6829.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.Understand this errorAI
index.60ee613b.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.Understand this errorAI
localhost/:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:8839/_app/immutable/entry/start.4362bce6.js

我用火狐,edge 或者手机的safari都不行啊

访问你这个连接会输出大量文本内容

@noonisy
Copy link

noonisy commented Nov 20, 2024

实在不行就pip uninstall memos,重新装一遍,目前版本0.19.1

大概率是你版本的问题。。

@yuyun2000
Copy link
Author

已经卸载,然后删除所有文件,重装,问题依旧啊

@noonisy
Copy link

noonisy commented Nov 20, 2024

现在输出啥

@yuyun2000
Copy link
Author

image
问题y依旧,我用火狐浏览器调试,输出的这个信息可能有用点

@noonisy
Copy link

noonisy commented Nov 20, 2024

手动给环境中memos库中的static/app.html中的link加上type="application/javascript"看看?

@yuyun2000
Copy link
Author

问题依旧:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<link type="application/javascript" />
		<link rel="icon" href="/favicon.png" />
		
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		
		<link rel="modulepreload" href="/_app/immutable/entry/start.355b6597.js">
		<link rel="modulepreload" href="/_app/immutable/chunks/scheduler.5c1cff6e.js">
		<link rel="modulepreload" href="/_app/immutable/chunks/singletons.12c64cda.js">
		<link rel="modulepreload" href="/_app/immutable/chunks/index.5c08976b.js">
		<link rel="modulepreload" href="/_app/immutable/entry/app.f81da1f9.js">
		<link rel="modulepreload" href="/_app/immutable/chunks/index.60ee613b.js">
	</head>
	<body data-sveltekit-preload-data="hover">
		<div style="display: contents">
			<script>
				{
					__sveltekit_mf8wn3 = {
						base: "",
						env: {"PUBLIC_API_ENDPOINT":""}
					};

					const element = document.currentScript.parentElement;

					Promise.all([
						import("/_app/immutable/entry/start.355b6597.js"),
						import("/_app/immutable/entry/app.f81da1f9.js")
					]).then(([kit, app]) => {
						kit.start(app, element);
					});
				}
			</script>
		</div>
	</body>
</html>

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

image 问题y依旧,我用火狐浏览器调试,输出的这个信息可能有用点

我感觉应该是 fastapi 返回的文件的 content type 出了问题,可否尝试更新:

pip install -U fastapi

@yuyun2000
Copy link
Author

fastapi已经是最新的了 0.115.5 尝试了0.114.0和0.111.0 均不行...

@yuyun2000
Copy link
Author

yuyun2000 commented Nov 20, 2024

那个app.html 我直接用浏览器打开也看不了啊

服了,可能和公司的加密软件有关系,逆天,我自己先看看

感觉也不对啊,这都加载出来网页图标了...

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

image 问题y依旧,我用火狐浏览器调试,输出的这个信息可能有用点

我感觉应该是 fastapi 返回的文件的 content type 出了问题,可否尝试更新:

pip install -U fastapi

针对这个报错,它是说本来应该 text/javascript 的 content type 却返回了 text/plain ,结果 js 就没有执行。但是这个问题我的确没有遇到。不过也可能是和 windows 有关系的,我目前并没有在 windows 测试这个问题。

@yuyun2000
Copy link
Author

那咋办 作者大人

@arkohut
Copy link
Owner

arkohut commented Nov 20, 2024

我测试了 windows 是好的...然后麻烦再确认下 starlette 的版本。

@yuyun2000
Copy link
Author

yuyun2000 commented Nov 20, 2024

0.37.2 这个版本是因为我降级fastapi才这么低的,当我安装最新的fastapi和最新的starlette的时候,依然打不开

目前fastapi==0.115.5 starlette==0.41.3

@yuyun2000
Copy link
Author

yuyun2000 commented Nov 21, 2024

一天过去了,我还在孤独的等待 @arkohut

@taliove
Copy link

taliove commented Nov 21, 2024

一天过去了,我还在孤独的等待 @arkohut

我卸载memos后,重新安装到最新版本后解决我的问题了。可以打开管理页面了。

@arkohut
Copy link
Owner

arkohut commented Nov 21, 2024

一天过去了,我还在孤独的等待 @arkohut

我卸载memos后,重新安装到最新版本后解决我的问题了。可以打开管理页面了。

你的问题和他的不是一个额,你的是依赖问题,最新的版本已经解决了

@arkohut
Copy link
Owner

arkohut commented Nov 21, 2024

一天过去了,我还在孤独的等待 @arkohut

因为这个问题我目前没有复现啊,你要不也试试重装啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants