Troubleshooting
emtrans is not recognized
The command is not on your PATH.
- Check the install:
python -m pip install -e . - Add the Python user-scripts directory to
PATH, or - Run the module directly:
python -m emtranslator "Hello world"
ModuleNotFoundError: No module named 'emtranslator'
The package is not installed in the active Python environment. Install it with:
python -m pip install -e .
or, without installing, set PYTHONPATH to the src directory.
emtrans: error: No input text provided (exit code 2)
You ran emtrans (the translate command) with no text argument while stdin was
a terminal. Provide text, a file, or piped input:
emtrans "Hello"
emtrans -i input.txt
echo "Hello" | emtrans
emtrans: error: Cannot use both a text argument and --input
translate accepts either positional text or --input FILE, not both. Use one
of them.
My new word is not translated
Check the precedence order in Configuration:
- If a word exists in multiple places, the custom
--dictionaryfile wins, then the user dictionary, then the built-in dictionary. - Verify the word was actually saved:
emtrans list | grep <word>
If it was written with -d FILE, remember to pass the same -d FILE when
translating.
Words are translated but punctuation is wrong
Punctuation is preserved character-for-character as it appears in the input. If
a comma is glued to a word (e.g. hello,), the comma stays glued in the output.
There is no automatic spacing or typography normalization.
The config file looks like JSON but is ignored
User dictionaries are now stored as TOML at
~/.config/neostore/emtranslator/config.toml. A legacy JSON file at
~/.config/emtranslator/dictionary.json is imported automatically on first load
(migration). Files passed
with --dictionary must use the TOML format too.
Translator uses the wrong config file
Construct it with an explicit path:
from emtranslator import Translator
t = Translator(user_dict_path="/path/to/config.toml")
The dictionary file fails to parse
The TOML parser in dictionary.py supports only flat string tables such as
"hello" = "monsu_1". Tables ([section]), arrays, numbers, and booleans are
ignored or rejected. Keep custom files to simple string key-value pairs.
Tests fail locally
Run the full suite to see the failure:
python -m pytest -v
The CLI tests run python -m emtranslator as a subprocess, so they require the
package to be importable (install with python -m pip install -e . first).