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

setting cwd for inkscape subprocess uses wrong directory #40

Open
dvzrv opened this issue Sep 19, 2020 · 0 comments
Open

setting cwd for inkscape subprocess uses wrong directory #40

dvzrv opened this issue Sep 19, 2020 · 0 comments

Comments

@dvzrv
Copy link
Contributor

dvzrv commented Sep 19, 2020

While trying to do the work on #39 I tried to use the default inkscape-based compilation of the videos.
Unfortunately the subprocess call in renderlib.py sets cwd to task.workdir:

errorReturn = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT, cwd=task.workdir)

This leads to inkscape not being able to open the generated SVG files, because the path is concatenated to something like /absolute/path/to/<project_dir>/artwork/<project_dir>/artwork/.frames/.
Moreover, this does not lead to make.py (or rather renderlib.py) exiting with a non-zero exit code. The script tries to render all frames, but ultimately fails to finish any of them and is therefore also unable to render the video (the process should exit early).

For me it worked to just remove the cwd setting.

mstock added a commit to mstock/intro-outro-generator that referenced this issue Jul 16, 2021
Since the command is run in `task.workdir` instead of the original working
directory, the potentially relative paths passed by the caller(s) may not
point to actual files when running inkscape, which results in failed
renderings.

This seems to have mainly affected running under `--debug`, but should fix
voc#40 (which doesn't say the issue was seen under `--debug` though).
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

1 participant