You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cd mozc-2.18.2620.102/src/dictionary/
$ python2 gen_zip_code_seed.py --zip_code=KEN_ALL.CSV --jigyosyo=JIGYOSYO.CSV >> test
Traceback (most recent call last):
File "gen_zip_code_seed.py", line 59, in <module>
from dictionary import zip_code_util
ImportError: No module named dictionary
This will fix it.
sed -i "s/from dictionary import zip_code_util/import zip_code_util/g" gen_zip_code_seed.py
The text was updated successfully, but these errors were encountered:
Thank you for the report and sorry about the trouble. This is actually a known issue regarding how Mozc team open-sources code from internal repository to GitHub. In internal repository, we assume that PYTHONPATH always includes the top directory of Mozc's source directory. Although we can forget about this when building Mozc because build_mozc.py automatically does this [1] for you, we have to do that manually when we manually run our Python scripts from console.
Can you try the following command instead?
cd mozc-2.18.2620.102/src
PYTHONPATH="${PYTHONPATH}:${PWD}" python dictionary/gen_zip_code_seed.py --zip_code=KEN_ALL.CSV --jigyosyo=JIGYOSYO.CSV >> test
We will update the comment in src/data/dictionary_oss/README.txt in a later commit to make it clear that we have to manually set PYTHONPATH.
With f130f24, it's now more obvious
that we have to specify PYTHONPATH when calling our python script
directly.
BUG=#391
TEST=
REF_BUG=32281113
REF_CL=137020326
REF_TIME=2016-10-24T06:05:10-07:00
REF_TIME_RAW=1477314310 -0700
Mozc-2.18.2620.102+24.0.oss
This will fix it.
The text was updated successfully, but these errors were encountered: