RossBoylan / mccli

0 stars 0 forks source link

No such file or directory: b.csv when I run it #2

Open RossBoylan opened 4 years ago

RossBoylan commented 4 years ago

Joanne also mentioned seeing errors about b.csv sometimes. Here's what I got:

C:\Users\rdboylan\Documents\KBD2\mod91_test-MC-costs_ARG>node ..\mccli\bin\mc run 0 1 33
ERR montecarlo.py run failed
Traceback (most recent call last):
  File "C:\Users\rdboylan\Documents\KBD2\mccli\bin\js/../python/montecarlo.py", line 687, in <module>
    main()
  File "C:\Users\rdboylan\Documents\KBD2\mccli\bin\js/../python/montecarlo.py", line 31, in main
    datfile.save_raw_data()
  File "C:\Users\rdboylan\Documents\KBD2\mccli\bin\js/../python/montecarlo.py", line 167, in save_raw_data
    with open('MC/input_variation/dat_files/' + self.file_data['filename'] + '.csv', 'a',newline='') as totals_file:
FileNotFoundError: [Errno 2] No such file or directory: 'MC/input_variation/dat_files/b.csv'

C:\Users\rdboylan\Documents\KBD2\mod91_test-MC-costs_ARG>node ..\mccli\bin\mc run 0 1 33
C:\Users\rdboylan\Documents\node_modules\yargs\yargs.js:1148
      else throw err
RossBoylan commented 4 years ago

Analysis: this is the result of attempting to run iteration 1 before running iteration 0, which creates many of the essential files and directories. The command is not, as I thought, mc run <first iteration> <# of iterations> but, as I documented mc run <# of iterations> <first iteration>!

So my command attempted to run 0 iterations starting with iteration 1, which did cause iteration 1 to run (seems as if it shouldn't have....).

Joanne thinks it is likely that the problems she ran into had a similar source.

At one level, this is not a bug at all but user error.

However, it raises some general questions about how to handle incomplete runs, more fully expanded in #5.

More narrowly, is there a usability problem here?

And why did a request for 0 iterations produce any activity?

Because of these lingering issues, I'm leaving this issue open, although the immediate problem is resolved.