-
Notifications
You must be signed in to change notification settings - Fork 32
fix relative paths for METS file #1353
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
Changes from all commits
ff83a51
36bebe2
14a8f30
b308c87
e284662
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -418,7 +418,8 @@ def __init__(self, workspace, url): | |
| def create_process(mets_server_url: str, ws_dir_path: str, log_file: str) -> int: | ||
| sub_process = Popen( | ||
| args=["ocrd", "workspace", "-U", f"{mets_server_url}", "-d", f"{ws_dir_path}", "server", "start"], | ||
| stdout=open(file=log_file, mode="w"), stderr=open(file=log_file, mode="a"), cwd=ws_dir_path, | ||
| stdout=open(file=log_file, mode="w"), stderr=open(file=log_file, mode="a"), | ||
| #cwd=ws_dir_path, # rs: if relative, this will cause wrong path resolution in the subprocess | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point! Potentially setting the current working directory to workspace directory path was the only way to make it work without changing/fixing the Workspace class itself or the workspace CLI. However, that had other side effects leading to a different bug.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| shell=False, universal_newlines=True, start_new_session=True | ||
| ) | ||
| # Wait for the mets server to start | ||
|
|
@@ -446,7 +447,7 @@ def shutdown(self): | |
| Path(self.url).unlink() | ||
|
|
||
| def startup(self): | ||
| self.log.info("Configuring the METS Server") | ||
| self.log.info("Configuring the METS Server for %s", self.workspace) | ||
|
|
||
| workspace = self.workspace | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.