mjenior/riptide

unable to save riptide output

Closed this issue · 1 comments

Whatever path i enter , it always throw the same error

WARNING: Output path already exists, overwriting previous files
Saving results to ripout_20230524_172604_20230524_172604
Traceback (most recent call last):
File "", line 1, in
File "/home/mibiome/.local/lib/python3.10/site-packages/riptide.py", line 88, in save_output
cobra.io.save_json_model(riptide_obj.model, outFile)
File "/home/mibiome/.local/lib/python3.10/site-packages/cobra/io/json.py", line 122, in save_json_model
with open(filename, "w") as file_handle:
FileNotFoundError: [Errno 2] No such file or directory: 'ripout_20230524_172604_20230524_172604/model.json'

riptide.save_output(riptide_obj=riptide_object_1_a)
WARNING: Did not provide an output directory. Using default riptide_files in working directory
WARNING: Output path already exists, overwriting previous files
Saving results to M_GCF_020912005_1_riptide_20230524_172604
Traceback (most recent call last):
File "", line 1, in
File "/home/mibiome/.local/lib/python3.10/site-packages/riptide.py", line 88, in save_output
cobra.io.save_json_model(riptide_obj.model, outFile)
File "/home/mibiome/.local/lib/python3.10/site-packages/cobra/io/json.py", line 122, in save_json_model
with open(filename, "w") as file_handle:
FileNotFoundError: [Errno 2] No such file or directory: 'M_GCF_020912005_1_riptide_20230524_172604/model.json'

Hey there,
Sorry about that! Found the source of the bug and pushed v3.4.80 to PyPi.

It was an accidental combination of os.mkdir() and os.makedirs() to the non-existent os.mkdirs(). Let me know if you still hit errors.