Unable to load data stored with Pins on rstudio connect

Hello,

I'm currently working with the package pins. I am an RSW user with the following configuration:

R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached are base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] pins_1.0.1 yaml_2.3.5

loaded via a namespace (and not attached):
[1] fansi_1.0.3 digest_0.6.29 utf8_1.2.2 crayon_1.5.1 rappdirs_0.3.3 R6_2.5.1
[7] jsonlite_1.8.0 lifecycle_1.0.1 magrittr_2.0.3 httr_1.4.3 pillar_1.7.0 rlang_1.0.2
[13] cli_3.3.0 curl_4.3.2 rstudioapi_0.13 fs_1.5.2 vctrs_0.4.1 ellipsis_0.3.2
[19] tools_4.1.3 glue_1.6.2 rsconnect_0.8.26 compiler_4.1.3 askpass_1.1 pkgconfig_2.0.3
[25] openssl_2.0.2 tibble_3.1.7

I managed to push datasets on R Studio connect with pins.

Now I'd like to use one of that datasets on RSW. I am able to connect on RsStudio connect with the command:

board_rsconnect()

However, when I tried to load one of the datasets by using:

pin_read(board, "earth2")

It doesn't load the data. Instead, there is the following message:

    Error in yaml.load(string, error.label = error.label, ...) : 
      (~/.cache/pins/rsc-e62371cfd77db754024f9c5ed3556a73/51ca356e-619e-4148-b12f-35e3e652d14d/79/data.txt) Scanner error: mapping values are not allowed in this context at line 36, column 20955
    In addition: Warning message:
    In readLines(file, warn = readLines.warn) :
      incomplete final line found on '~/.cache/pins/rsc-e62371cfd77db754024f9c5ed3556a73/51ca356e-619e-4148-b12f-35e3e652d14d/79/data.txt'

By searching similar issues, someone has achieved to load it by deleting the data.txt file but it failed for me. board_register yaml error · Issue #463 · rstudio/pins-r · GitHub
Do you know where the error came from?

Dear all,

A quick update on the bug.

I tried to bypass the pin_read function. I used the function read.csv with the URL to the dataset pins on rconnect instead of the pin_read function. Sadly, it didn't work.

I also used download.files() function go get the dataset on my working environment on RSW but I got an HTML instead. The HTML is associated with the authentification to the active directory of the company. (login/password etc...).

The file is the same that data.txt in the cache. What I didn't understand for the moment, is how can I write pins on rsconnect without problem but when I tried to read the file on the same rstudio connect, I get that HTML login file.

I also tried to delete all caches manually andby using cache_prune(days= 0) and relaunch the pin_read() command but without success:

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.

Howdy @YALM! Apologies for missing this!

For reference - discussion continued here: Unable to load data stored with pins on rstudio connect · Issue #622 · rstudio/pins · GitHub