medizininformatik-initiative / Projectathon6-miracum1

5 stars 4 forks source link

cannot open file '//customRF.R': No such file or directory #16

Closed GeorgFette closed 1 year ago

GeorgFette commented 1 year ago

I get this error during execution:

2023-02-06 10:04:59 Error in file(filename, "r", encoding = encoding) : 2023-02-06 10:04:59 cannot open the connection 2023-02-06 10:04:59 Calls: source -> withVisible -> eval -> eval -> source -> file 2023-02-06 10:04:59 In addition: Warning messages: 2023-02-06 10:04:59 1: In readLines(con, warn = readLines.warn) : 2023-02-06 10:04:59 incomplete final line found on '/config.yml' 2023-02-06 10:04:59 2: In file(filename, "r", encoding = encoding) : 2023-02-06 10:04:59 cannot open file '//customRF.R': No such file or directory 2023-02-06 10:04:59 Execution halted

NandhiniS08 commented 1 year ago

Can you see in your folder structure if there is filename customRF.R?

GeorgFette commented 1 year ago

yes, it is there

NandhiniS08 commented 1 year ago

Can you change the line number 33 of the script _4_modeling1_fixedwindowfalse.R

GeorgFette commented 1 year ago

it still get's the error. Should I add that part in the file 5_modeling2_fixedwindow_true.R as well ?

NandhiniS08 commented 1 year ago

Does the error now comes in ths file now 5_modeling2_fixedwindow_true.R ? Yes please.. That would be great

GeorgFette commented 1 year ago

The error still stays. How can I see in which R-File the exception occurs ?

NandhiniS08 commented 1 year ago

There are print statements added in the script while excution which can help us identify the source of error. If the 4_modeling1_fixedwindow_false.R script is finished, there will be a lot of model objects generated in the reults folder. Do you see that?

GeorgFette commented 1 year ago

no, I think he is still in the 4-R-File

NandhiniS08 commented 1 year ago

Can you try this: source("customRF.R", chdir = TRUE) ?

GeorgFette commented 1 year ago

again the same error. Here is a bit longer output:

2023-02-06 13:37:49 Warning messages: 2023-02-06 13:37:49 1: In readLines(con, warn = readLines.warn) : 2023-02-06 13:37:49 incomplete final line found on '/config.yml' 2023-02-06 13:37:49 2: funs() was deprecated in dplyr 0.8.0. 2023-02-06 13:37:49 ℹ Please use a list of either functions or lambdas: 2023-02-06 13:37:49 2023-02-06 13:37:49 # Simple named list: list(mean = mean, median = median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Auto named with tibble::lst(): tibble::lst(mean, median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) 2023-02-06 13:37:49 3: funs() was deprecated in dplyr 0.8.0. 2023-02-06 13:37:49 ℹ Please use a list of either functions or lambdas: 2023-02-06 13:37:49 2023-02-06 13:37:49 # Simple named list: list(mean = mean, median = median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Auto named with tibble::lst(): tibble::lst(mean, median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) 2023-02-06 13:37:49 4: funs() was deprecated in dplyr 0.8.0. 2023-02-06 13:37:49 ℹ Please use a list of either functions or lambdas: 2023-02-06 13:37:49 2023-02-06 13:37:49 # Simple named list: list(mean = mean, median = median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Auto named with tibble::lst(): tibble::lst(mean, median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) 2023-02-06 13:37:49 5: funs() was deprecated in dplyr 0.8.0. 2023-02-06 13:37:49 ℹ Please use a list of either functions or lambdas: 2023-02-06 13:37:49 2023-02-06 13:37:49 # Simple named list: list(mean = mean, median = median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Auto named with tibble::lst(): tibble::lst(mean, median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) 2023-02-06 13:37:49 6: funs() was deprecated in dplyr 0.8.0. 2023-02-06 13:37:49 ℹ Please use a list of either functions or lambdas: 2023-02-06 13:37:49 2023-02-06 13:37:49 # Simple named list: list(mean = mean, median = median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Auto named with tibble::lst(): tibble::lst(mean, median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) 2023-02-06 13:37:49 7: funs() was deprecated in dplyr 0.8.0. 2023-02-06 13:37:49 [1] "Feature extraction done" 2023-02-06 13:37:49 ℹ Please use a list of either functions or lambdas: 2023-02-06 13:37:49 2023-02-06 13:37:49 # Simple named list: list(mean = mean, median = median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Auto named with tibble::lst(): tibble::lst(mean, median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) 2023-02-06 13:37:49 8: funs() was deprecated in dplyr 0.8.0. 2023-02-06 13:37:49 ℹ Please use a list of either functions or lambdas: 2023-02-06 13:37:49 2023-02-06 13:37:49 # Simple named list: list(mean = mean, median = median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Auto named with tibble::lst(): tibble::lst(mean, median) 2023-02-06 13:37:49 2023-02-06 13:37:49 # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE)) 2023-02-06 13:37:51 Error in file(filename, "r", encoding = encoding) : 2023-02-06 13:37:51 cannot open the connection 2023-02-06 13:37:51 Calls: source -> withVisible -> eval -> eval -> source -> file 2023-02-06 13:37:51 In addition: Warning messages: 2023-02-06 13:37:51 1: In readLines(con, warn = readLines.warn) : 2023-02-06 13:37:51 incomplete final line found on '/config.yml' 2023-02-06 13:37:51 2: In file(filename, "r", encoding = encoding) : 2023-02-06 13:37:51 cannot open file '//customRF.R': No such file or directory 2023-02-06 13:37:51 Execution halted

NandhiniS08 commented 1 year ago

The issue is the file is added newly and it is missed to be added in the dockerfile. Therefore its not locating it while you are running through docker. I have made this change and pushed a new version. can you please pull the latest version and run it

GeorgFette commented 1 year ago

hm, no, that didn't help. The error is still the same

NandhiniS08 commented 1 year ago

Docker pruned and built again. It runs fine