def main():
print(apertium.translate("nob", "nno", "mitt navn er tore"))
if name == 'main':
main()
`
Have set up apertium-python in venv. Trying to translate but met with same constant error.
Error:
Traceback (most recent call last):
File "C:\Users\USER\PycharmProjects\nynorskOversetter\main.py", line 9, in
main()
File "C:\Users\USER\PycharmProjects\nynorskOversetter\main.py", line 5, in main
print(apertium.translate("nob", "nno", "mitt navn er tore"))
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation__init.py", line 187, in translate
return translator.translate(text, mark_unknown, formatting, deformat, reformat)
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation__init.py", line 168, in translate
deformatted = self._get_deformat(str(deformater), text)
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation\init.py", line 122, in _get_deformat
self._check_ret_code(proc_deformat)
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation\init__.py", line 68, in _check_ret_code
raise CalledProcessError() # type: ignore
TypeError: init__() missing 2 required positional arguments: 'returncode' and 'cmd'
`import apertium
def main(): print(apertium.translate("nob", "nno", "mitt navn er tore"))
if name == 'main': main() `
Have set up apertium-python in venv. Trying to translate but met with same constant error.
Error: Traceback (most recent call last): File "C:\Users\USER\PycharmProjects\nynorskOversetter\main.py", line 9, in
main()
File "C:\Users\USER\PycharmProjects\nynorskOversetter\main.py", line 5, in main
print(apertium.translate("nob", "nno", "mitt navn er tore"))
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation__init.py", line 187, in translate
return translator.translate(text, mark_unknown, formatting, deformat, reformat)
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation__init.py", line 168, in translate
deformatted = self._get_deformat(str(deformater), text)
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation\init.py", line 122, in _get_deformat
self._check_ret_code(proc_deformat)
File "C:\Users\USER\PycharmProjects\nynorskOversetter\venv\lib\site-packages\apertium\translation\init__.py", line 68, in _check_ret_code
raise CalledProcessError() # type: ignore
TypeError: init__() missing 2 required positional arguments: 'returncode' and 'cmd'