title: R SQL Server file does not exist error - but it does
body: <p>I'm running R 3.5.2 inside SQL Server 2019.</p>
  <p>Loading the pre-trained udpipe model using the following command:</p>
  <pre><code>udmodel_english &lt;- udpipe_load_model(file = ''C:/ud/english-ewt-ud-2.5-191206.udpipe'')
  </code></pre>
  <p>This works fine in Rstudio, and R directly. However when running as a SQL External script I get the following error:</p>
  <pre><code>Error in udpipe_load_model(file = &quot;C:/ud/english-ewt-ud-2.5-191206.udpipe&quot;) : 
    File C:/ud/english-ewt-ud-25-191206.udpipe containing the language model does not exist
  Calls: source -&gt; withVisible -&gt; eval -&gt; eval -&gt; udpipe_load_model
  </code></pre>
  <p>However the file is there, it does exist, and loads via Rstudio with no issue.</p>
  <p>Any suggestions would be extremely helpful.</p>
  <p>Full code as FYI:</p>
  <pre><code>Begin
  EXEC sp_execute_external_script       
  @language = N'R',
  @script = N' 
  
  library(zoo)
  library(xts)
  library(udpipe)
  
  #model &lt;- udpipe_download_model(language = &quot;english&quot;)
  udmodel_english &lt;- udpipe_load_model(file = ''C:/ud/english-ewt-ud-2.5-191206.udpipe'')
  '
  End
  </code></pre>
  <p>Full error as FYI:</p>
  <pre><code>Msg 39004, Level 16, State 20, Line 29
  A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
  Msg 39019, Level 16, State 2, Line 29
  An external script error occurred: 
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Error in udpipe_load_model(file = &quot;C:/ud/english-ewt-ud-2.5-191206.udpipe&quot;) : 
    File C:/ud/english-ewt-ud-25-191206.udpipe containing the language model does not exist
  Calls: source -&gt; withVisible -&gt; eval -&gt; eval -&gt; udpipe_load_model
  In addition: Warning messages:
  1: package 'zoo' was built under R version 3.5.3 
  2: package 'xts' was built under R version 3.5.3 
  3: package 'udpipe' was built under R version 3.5.3 
  
  Error in execution.  Check the output for more information.
  Error in eval(ei, envir) : 
    Error in execution.  Check the output for more information.
  Calls: runScriptFile -&gt; source -&gt; withVisible -&gt; eval -&gt; eval -&gt; .Call
  Execution halted
  </code></pre>
  <p>Thanks</p>