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がインストールされていない場合は起動前に異常終了する #106

Closed
wants to merge 7 commits into from

Conversation

massongit
Copy link
Contributor

@massongit massongit commented Mar 3, 2023

Fix #109

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 な状態で起動すると、キーワードを覚える際に上記エラーで落ちます。
従って、 keywordEnabled: true な場合はbot起動前にMeCabと mecab-ipadic-neologd が入っているか確認し、入っていなかったら落ちるようにします。

@massongit
Copy link
Contributor Author

massongit commented Mar 18, 2023

まず #109 で方針を固めた方が良いのでclose。

@massongit massongit closed this Mar 18, 2023
@massongit massongit deleted the add_mecab_install_check branch March 18, 2023 11:48
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

Successfully merging this pull request may close these issues.

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