Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program crashes #29

Open
reikopm opened this issue Oct 4, 2017 · 4 comments
Open

Program crashes #29

reikopm opened this issue Oct 4, 2017 · 4 comments

Comments

@reikopm
Copy link
Contributor

reikopm commented Oct 4, 2017

Intermittently with this error message:
Error in file.copy(from = file.path(input, files), to = output_dir, recursive = TRUE) :
more 'from' files than 'to' files
In addition: There were 12 warnings (use warnings() to see them)

warnings()
Warning messages:
1: In dir.create(output_dir) :
cannot create dir 'C:\Users\reiko\Documents\gitrepos\info-mb\rmd..\docs', reason 'Permission denied'
2: In dir.create(output_lib_dir) :
cannot create dir 'C:\Users\reiko\Documents\gitrepos\info-mb\rmd..\docs\site_libs', reason 'No such file or directory'
3: In file.copy(file.path(lib_dir, lib), output_lib_dir, ... :
'recursive' will be ignored as 'to' is not a single existing directory
4: In file.create(to[okay]) :
cannot create file 'C:\Users\reiko\Documents\gitrepos\info-mb/rmd/../docs/site_libs', reason 'No such file or directory'

@7yl4r
Copy link
Member

7yl4r commented Oct 4, 2017

I haven't seen this before. Those file paths don't look very windows-friendly, so I am guessing this is probably a windows compatibility issue.

I don't have a windows machine handy to test this, but the fix may be as simple as fixing some path strings. I'll have to figure out how to say os.path.join in R though. 😄

@reikopm
Copy link
Contributor Author

reikopm commented Oct 4, 2017

I think you are right that it is a windows problem, but I also think it might have something to do with github. I'm using RStudio. And R v 3.4.1

I'll look into the path string problem. Thanks -R

@bbest
Copy link
Contributor

bbest commented Oct 4, 2017

Hi @reikopm,

You'll need to update the path. Unfortunately Windows chose to use the backslash \ as a path separator, which for the rest of the computing world has been reserved as the escape character to construct things like newline \n, tab \t or similar. So you'll need to do 1 of 2 things:

  1. Replace backslashes \ with forwardslashes /, the otherwise universally understood path separator. I recommend this strategy.

  2. Escape the escape character by replacing backslashes \ with escaped backslashes \\. This looks messier to me.

You can also use file.path() (eg file.path('dira','dirb','file.txt')) to construct a path (eg 'dira/dirb/file.txt').

7yl4r added a commit that referenced this issue Oct 4, 2017
@7yl4r
Copy link
Member

7yl4r commented Oct 4, 2017

@reikopm please try using the latest infographiq and let us know if that fix I just pushed helps.

@7yl4r 7yl4r added this to To do in mbon tech Jun 29, 2018
@7yl4r 7yl4r moved this from To do to stale in mbon tech Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
mbon tech
  
stale
Development

No branches or pull requests

3 participants