-
Notifications
You must be signed in to change notification settings - Fork 12
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
Can't read a pin from board_s3 #217
Comments
Before @isabelizimm gets back from vacation next week, I just want to assure you that absolutely you should be able to roundtrip a pin through R and Python on S3, Posit Connect, etc. If you navigate to the S3 bucket and check out the folder where these pins are stored, do you see a metadata file? It should be in the version folder, called |
Hi Julia, I have two pins saved: This one is a CSV
This one is RDS, but this one can't be read in Python since it's a binary R data file. I also wanted to ask if it's possible to save it as parquet with R and then read it with Python.
|
The error sounds like it it having a hard time reading the metadata so I wanted to doublecheck the metadata is there and in the correct format. For that CSV pin, do you see the I have navigated to a version folder, and then I see the file: really-pretty-numbers.json
file_size: 23
pin_hash: c3943ca5a9aab2df
type: json
title: 'really-pretty-numbers: a pinned integer vector'
description: ~
created: 20221103T022316Z
api_version: 1.0 |
Ohh, I thought by doing pin_meta() you would also get the information you need. I checked the S3 bucket through the console and the file is there but I don’t have permission to see the txt file. I’m gonna ask the admin to give me access and I’ll get back to you :) |
Ah, I definitely think that would be the problem if you don't have permissions to access the file. A user who wants to read a pin needs to have permissions to access the directory where the pin contents plus metadata are stored. |
Hey there! I am back from OOO and hopping in to confirm @juliasilge-- you won't be able to see any pin metadata without access. Let us know if getting permissions sorted out fixes your problem 😄 |
Thank you both ;) In the meantime while I wait to get read access from the admin, I managed to copy the txt file to my local path. This is how the txt looks like:
I have another question, how come I can read the pin with R but not with Python? does R read the metadata in a different way than Python? |
That
I have been wondering the same thing!!! 🤯 It must be some difference in how the R package and Python package do authentication? In terms of reading the file itself:
https://github.com/rstudio/pins-r/blob/b3f1fcd7b9cb7743a4fc0dbf3c723e9546cb8415/R/board_s3.R#L336-L339
|
Hmmm.... I wonder if your board = pins.board_s3("pins-testing")
board.pin_read("starwars-data-test") One way the error you see can manifest is if you've added too much information in your board creation, eg board = pins.board_s3("pins-testing/starwars-data-test") # this will give a PinsError
board.pin_read("starwars-data-test") A way to check if you've added the path you expect is if you run |
First of all, thank you for looking at my question :)
I have the following issue. I'm able to access the board and also list which pins are inside:
But when I try to read a pin
I get the following error:
I also want to note that the board and the pin was initially created with R, could that be an issue?
The text was updated successfully, but these errors were encountered: