carissalow / rapids

Reproducible Analysis Pipeline for Data Streams
http://www.rapids.science/
GNU Affero General Public License v3.0
37 stars 20 forks source link

RuleException in merge_heatmap_sensors_per_minute_per_time_segment #170

Open junoslukan opened 2 years ago

junoslukan commented 2 years ago

While trying to get the report from merge_heatmap_sensors_per_minute_per_time_segment I got the following exception:

[Wed Dec 15 17:04:08 2021]
rule merge_heatmap_sensors_per_minute_per_time_segment:
    input: reports/interim/p011/heatmap_sensors_per_minute_per_time_segment.html, reports/interim/p021/heatmap_sensors_per_minute_per_time_segment.html
    output: reports/data_exploration/heatmap_sensors_per_minute_per_time_segment.html
    jobid: 143

Quitting from lines 70-71 (tmpd4ngc4mx.merge_heatmap_sensors_per_minute_per_time_segment.Rmd)
Error in file(filename, "r", encoding = encoding) :
  cannot open the connection
Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> source -> file
Execution halted
[Wed Dec 15 17:04:09 2021]
Error in rule merge_heatmap_sensors_per_minute_per_time_segment:
    jobid: 143
    output: reports/data_exploration/heatmap_sensors_per_minute_per_time_segment.html

RuleException:
[Continued with the traceback by Snakemake.]

After some testing, it turned out that the following line was problematic:

source("renv/activate.R")

I am not sure whether rmarkdown deals with paths in .Rmd files differently than what happens in regular R scripts. However, providing the absolute path to the activate.R script fixed the problem.

Ideally, the path would be kept relative, but I am at a loss about what rmarkdown expects here.

JulioV commented 2 years ago

Leaving open for now, if anyone else encounters the same problem we will investigate further. It might be related to paths in WSL. @Meng6 if there is anyone running RAPIDS on WSL, could you ask them to try to reproduce this problem? If there is no one, that's ok, we will wait for a new report

Meng6 commented 2 years ago

Sure, @JulioV. Our interns do not run RAPIDS on WSL. Let's wait for a new report.