unable to source files in R

No matter the file i use, (usually one containing functions and another for data load and wrangling) sourcing in R gives me an error:

> source(here::here("01-data-load.R"))
Error in result_create(conn@ptr, statement, is_statement) : 
  external pointer is not valid

All files are in the same folder/proect. Getwd gives me the correct folder.
If I execute any file line by line all worked ok.

Same situation here but no answer so far....

https://stat.ethz.ch/pipermail/r-sig-db/2015q4/001530.html

Do you have an idea where the problem's happening? If not, try R's debugging features:

debugonce(source)
source(here::here("01-data-load.R"))

After that, step through each statement one by one until you hit the error (in R Studio, keep clicking the "Next" button in the console debugger; in base R, keep entering n),

The sourced file never raised an error when debugging. Only when it''s sourced, So debugging line by line does not help.

Without seeing the script, it's hard to guess the problem.

In the meantime, the result_create function is probably from the RSQLite package (again, my guess which you can verify). Make sure you're using the most recent version of that package, because this error has been addressed in some situations: issues #217, #207.

Not using RSQLite
My data load connects to Mysql using RMariaDB

Same situation here

https://stat.ethz.ch/pipermail/r-sig-db/2015q4/001530.html

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.