pecan icon indicating copy to clipboard operation
pecan copied to clipboard

`run.write.configs()` fails without error

Open Aariq opened this issue 2 years ago • 3 comments

Bug Description

Still don't understand how to reproduce this, but I know where the bug is happening: https://github.com/PecanProject/pecan/blob/fbfcd2f26e4bad20cff9009da49e04ad85c05314/base/workflow/R/run.write.configs.R#L45 The result of this line is sometimes a 0x0 tibble (again, not sure how to reproduce because I don't quite know what it's doing here). This should probably error at this point. Instead, the function continues to run to the end and even prints "Finished writing model run config files", but the files don't get written to the rundir. The 0x0 tibble produced in line 45 cascades down to a few other functions, for example this line which prints the warning Unknown or uninitialised column: 'file_name': https://github.com/PecanProject/pecan/blob/fbfcd2f26e4bad20cff9009da49e04ad85c05314/base/workflow/R/run.write.configs.R#L48

To Reproduce

Steps to reproduce the behavior:

Best I can do right now is to run run.write.configs() in debug, run until line 45, then manually change files <- tibble::tibble()

Expected behavior

If the result of dbfile.check() is an empty tibble, the function should exit with an informative error message.

Aariq avatar Jul 22 '22 16:07 Aariq

#2967 could be fixed at the same time

Aariq avatar Jul 22 '22 16:07 Aariq

Actually, the problem should probably be fixed in dbfile.check()---it shouldn't return 0x0 tibbles.

Aariq avatar Aug 30 '22 15:08 Aariq

This issue is stale because it has been open 365 days with no activity.

github-actions[bot] avatar Aug 31 '23 00:08 github-actions[bot]