Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report: Issue when embedding in docker container #240

Closed
FavorMylikes opened this issue Jul 25, 2023 · 1 comment
Closed

Bug Report: Issue when embedding in docker container #240

FavorMylikes opened this issue Jul 25, 2023 · 1 comment

Comments

@FavorMylikes
Copy link

Issue

(env) root@7b8c194bd840:/app# $LASER/tasks/embed/embed.sh test.txt en
2023-07-25 10:53:40,954 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX
2023-07-25 10:53:41,329 | INFO | embed | spm_model: /app/models/laser2.spm
2023-07-25 10:53:41,329 | INFO | embed | spm_cvocab: /app/models/laser2.cvocab
2023-07-25 10:53:41,329 | INFO | embed | loading encoder: /app/models/laser2.pt
2023-07-25 10:53:41,948 | INFO | preprocess | SPM processing test.txt  
Traceback (most recent call last):
  File "/app/LASER/source/embed.py", line 630, in <module>
    sort_kind=args.sort_kind,
  File "/app/LASER/source/embed.py", line 541, in embed_sentences
    over_write=False,
  File "/app/LASER/source/lib/text_processing.py", line 144, in SPMApply
    run(["/bin/bash", "-o", "pipefail", "-c", command], check=True, capture_output=True)
  File "/opt/conda/envs/env/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

Key code

RUN conda create -n env python=3.6

run(["/bin/bash", "-o", "pipefail", "-c", command], check=True, capture_output=True)

Explanation

This parameter capture_output is added till Python 3.7, need a update for the Dockerfile

Reference

Python doc 3.7

@avidale
Copy link
Contributor

avidale commented Dec 1, 2023

@FavorMylikes The docker app has been updated in #251.
It should work properly now.

@avidale avidale closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants