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

keywordEnabled=trueでMeCabがインストールされていない場合は起動しないようにする #109

Open
massongit opened this issue Mar 18, 2023 · 0 comments

Comments

@massongit
Copy link
Contributor

massongit commented Mar 18, 2023

ai-app-1  | node:events:491
ai-app-1  |       throw er; // Unhandled 'error' event
ai-app-1  |       ^
ai-app-1  | 
ai-app-1  | Error: spawn /usr/bin/mecab ENOENT
ai-app-1  |     at ChildProcess._handle.onexit (node:internal/child_process:283:19)
ai-app-1  |     at onErrorNT (node:internal/child_process:476:16)
ai-app-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
ai-app-1  | Emitted 'error' event on ChildProcess instance at:
ai-app-1  |     at ChildProcess._handle.onexit (node:internal/child_process:289:12)
ai-app-1  |     at onErrorNT (node:internal/child_process:476:16)
ai-app-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
ai-app-1  |   errno: -2,
ai-app-1  |   code: 'ENOENT',
ai-app-1  |   syscall: 'spawn /usr/bin/mecab',
ai-app-1  |   path: '/usr/bin/mecab',
ai-app-1  |   spawnargs: [ '-d', '/usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd/' ]
ai-app-1  | }

Dockerで enable_mecab=0 にするなど、MeCabと mecab-ipadic-neologd がインストールされていない、かつ、 keywordEnabled: true な状態で起動すると、キーワードを覚える際に上記エラーで落ちます。
従って、bot起動前に上記の状態になっていないかをチェックし、なっている場合は起動しないようにすると良いかと思います。

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