Closed afristo closed 1 year ago
You might try copying the command line from the template string directly to a terminal? This would help determine if it's a path issue or a python issue. To confirm: the paths start with "/", are Mallet-202108
and input_data
both directories at the root of the filesystem, not the current working directory?
You might try copying the command line from the template string directly to a terminal? This would help determine if it's a path issue or a python issue. To confirm: the paths start with "/", are
Mallet-202108
andinput_data
both directories at the root of the filesystem, not the current working directory?
Yep! They are both located at the root of the filesystem, as is the python script running the commands.
I did log the template string before sending it to subprocess.run() and it is correct.
My guess is it's something going wrong with the subprocess
call. I'm not really sure what the error means and if it's interpreting 1
or import-file
as a file or command. If it's not a java issue I can't really help. If you figure it out and have a good example, please post it!
I fixed it by compiling the docker container again and removing the shell=True
argument. I don't think the issue was the subprocess command, but something with the underlying binaries.
I pulled the repository down, recompiled everything and it ran flawlessly
I'm using python 3.7 on a docker container and trying to run Mallet within the container. We are using a python wrapper to send the commands to Mallet (shown below):
I am getting the following error when I try to run this call:
import-file: 1: /Mallet-202108/bin/mallet: not found
I checked the file permissions for the "mallet" binary using
ls -lha
and I have read, write and execute.The filepath is also correct (verified with
pwd
andls
commands). I've tried changing the type of docker image, using the relative and absolute filepath and even changing the string for the command a bunch of different ways with no luck. Is there any other reason I am unable to execute the mallet binary file?