Helsinki-NLP / Opus-MT

Open neural machine translation models and web services
MIT License
592 stars 71 forks source link

Issue with Marian Server on Colab #46

Open leminhyen2 opened 2 years ago

leminhyen2 commented 2 years ago

Hi, while trying to run server.py. I encountered this issue and couldn't figure out

Future exception was never retrieved future: <Future finished exception=FileNotFoundError(2, "No such file or directory: 'marian-server'")> Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "server.py", line 65, in run '--maxi-batch', '100', File "/usr/local/lib/python3.7/dist-packages/tornado/process.py", line 240, in init self.proc = subprocess.Popen(*args, **kwargs) File "/usr/lib/python3.7/subprocess.py", line 800, in init restore_signals, start_new_session) File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'marian-server': 'marian-server'

Traceback (most recent call last): File "server.py", line 188, in application = make_app(args) File "server.py", line 166, in make_app worker_pool = initialize_workers(services) File "server.py", line 148, in initialize_workers source_lang, target_lang, pair_config, models[pair_config['configuration']]) File "server.py", line 23, in init targetspm=self.service.get('targetspm') File "/content/Opus-MT/content_processor.py", line 18, in init self.bpe_source = BPE(BPEcodes) File "/content/Opus-MT/apply_bpe.py", line 37, in init firstline = codes.readline() File "/usr/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 54: invalid start byte

jorgtied commented 2 years ago

Looks like marian-server is not available / installed in your colab instance.