timflutre / PlantBreedGame

A serious game to teach plant selective breeding.
https://sourcesup.renater.fr/plantbreedgame/
GNU Affero General Public License v3.0
8 stars 2 forks source link

Game initialisation error: `cannot open the connection` #39

Open chabrault opened 2 months ago

chabrault commented 2 months ago

Hi, I tried to install the last version of the game on my computer (Windows) and it didn't work. The script plantbreedgame_setup.Rmd compiled correctly

Encountered error message:

cannot open the connection

For reproducibility, here are the parameters used for this failed game initialisation:

{
  "rng_seed": 2003,
  "cost.pheno.field": 50,
  "cost.pheno.patho": 0.1,
  "cost.allof": 0.1,
  "cost.autof": 0.25,
  "cost.haplodiplo": 1,
  "cost.geno.hd": 1,
  "cost.geno.ld": 0.5,
  "cost.geno.single": 0.02,
  "cost.register": 4,
  "initialBudget": 3900,
  "t1_mu": 100,
  "t1_min": 20,
  "t1_cv_g": 0.1,
  "t1_h2": 0.3,
  "t2_mu": 15,
  "t2_min": 5,
  "t2_cv_g": 0.06,
  "t2_h2": 0.6,
  "prop_pleio": 0.4,
  "cor_pleio": -0.7
}

I don't know if it's linked or not to the issue #38.

juliendiot42 commented 2 months ago

The game will compile the plantbreedgame_setup.Rmd in a tempoary folder and it seems your system can't open it.

Could you try to compile a simple Rmd document with a plot (I think the one suggested when you create a new Rmd document from R studio contain one) with this command:

report_build_dir <- tempdir()
rmarkdown::render("path/to/simple/file.Rmd",
      output_file = tempfile(tmpdir = report_build_dir),
      intermediates_dir = report_build_dir, 
      encoding = "UTF-8",
    )

And tell me if it works, please ?

chabrault commented 2 months ago

It worked, I pasted below the output message: Output created: C:\Users\cbrault\AppData\Local\Temp\RtmpmKWJX3\file301c74787ea5.html and I was able to find and open the html there.

juliendiot42 commented 2 months ago

Well then I don't know and it is difficult to me to test on Windows. If you can confirm it is working with the docker image it is good enough for me.