現在の状況
mecab-python3 を利用して MeCab で形態素解析を行うアプリケーションを開発しています。
mecab のオプション -u を利用して /mnt/integration_test/outputs/custom.dic
に存在するユーザー辞書を利用した形態素解析を行いたいです。
上記のパスにはファイルが確かに存在し、直前に os.path.exists('/mnt/integration_test/outputs/custom.dic')
としても True
となるので間違いなくファイルは存在するのですが、下記の通り no such file or directory: /mnt/integration_test/outputs/custom.dic
のエラーが出てしまいます。
エラーが起きている環境は、python:3.11.1-bullseye イメージを利用したコンテナ内で起きています。
この現象はローカルの Windows Docker 環境では再現できないのですが、Google Cloud の Cloud Run を利用した場合に起きております。
なぜこのようなエラーになってしまうのか考えうる原因について、お力を貸していただけませんでしょうか。
Error Message
---------------------------------------------------------- Failed initializing MeCab. Please see the README for possible solutions: https://github.com/SamuraiT/mecab-python3#common-issues If you are still having trouble, please file an issue here, and include the ERROR DETAILS below: https://github.com/SamuraiT/mecab-python3/issues issueを英語で書く必要はありません。 ------------------- ERROR DETAILS ------------------------ arguments: -d "/usr/local/lib/mecab/dic/mecab-ipadic-neologd" -u "/mnt/integration_test/outputs/custom.dic" -F "%m,%c,%H " ) [tokenizer_->open(param)] tokenizer.cpp(127) [d->open(dicfile[i])] dictionary.cpp(79) [dmmap_->open(file, mode)] no such file or directory: /mnt/integration_test/outputs/custom.dic ----------------------------------------------------------
※なお、こちらのエラーは mecab-python3 でも issue としてご相談させていただいております。
https://github.com/SamuraiT/mecab-python3/issues

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。