We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaf67cc commit 240bd3cCopy full SHA for 240bd3c
1 file changed
src/dlstbx/wrapper/pipedream_xchem.py
@@ -333,9 +333,11 @@ def save_dataset_metadata(
333
output_yaml = {}
334
output_yaml[dtag] = metadata
335
json_file = f"{pipedream_dir}/Pipedream_output.json"
336
+ if not os.path.exists(json_file):
337
+ open(json_file, "w").close()
338
339
# Acquire a lock
- with portalocker.Lock(json_file, "a", timeout=5):
340
+ with portalocker.Lock(json_file, timeout=5):
341
if os.path.exists(json_file) and os.path.getsize(json_file) > 0:
342
with open(json_file, "r", encoding="utf-8") as f:
343
try:
@@ -344,6 +346,7 @@ def save_dataset_metadata(
344
346
self.log.debug(
345
347
f"Cannot continue with pipedream postprocessing: {e}"
348
)
349
+ return
350
else:
351
data = {}
352
0 commit comments