We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c2deec commit 6d64d16Copy full SHA for 6d64d16
linopy/remote/oetc.py
@@ -495,12 +495,10 @@ def solve_on_oetc(self, model): # type: ignore
495
"""
496
try:
497
# Save model to temporary file and upload
498
- model_dump_path = None
499
with tempfile.NamedTemporaryFile(prefix="linopy-", suffix=".nc") as fn:
500
- model_dump_path = fn.name
501
-
502
- model.to_netcdf(model_dump_path)
503
- input_file_name = self._upload_file_to_gcp(fn.name)
+ fn.file.close()
+ model.to_netcdf(fn.name)
+ input_file_name = self._upload_file_to_gcp(fn.name)
504
505
# Submit job and wait for completion
506
job_uuid = self._submit_job_to_compute_service(input_file_name)
0 commit comments