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

Error: $ operator is invalid for atomic vectors while listing files in a folder using s3_ls #20

Open
shrutivardhan opened this issue Jul 2, 2024 · 6 comments

Comments

@shrutivardhan
Copy link

I am using bototr to list files in a folder uisng
botor::s3_ls(uri ="s3://bucket/file_url/")
Its throwing following error:
Error in object$data$LastModified$strftime :
$ operator is invalid for atomic vectors
I am running the same on R Studio Version 4.3.1
botor package 0.4.0

@nfultz
Copy link

nfultz commented Jul 4, 2024

Dupe of #18 ???

@darsoo
Copy link

darsoo commented Aug 8, 2024

The bug was fixed but without a version bump, so @shrutivardhan is probably using the old one.
@daroczig could you bump the package version to distinguish the version with the fix from the one without?

@daroczig
Copy link
Owner

daroczig commented Aug 8, 2024

@darsoo sure, just pushed a638922

@daniellehouse-moj
Copy link

@darsoo @daroczig I was having the same issue with botor as @shrutivardhan, so used remotes::install_github('daroczig/botor')

I'm now getting a new error message:
botor says: Error in as.data.frame.default(x[[i]], optional = TRUE): cannot coerce class ‘c("datetime.datetime", "datetime.date", "python.builtin.object"’ to a data.frame

Is there a fix for this?

@daroczig
Copy link
Owner

@daniellehouse-moj I cannot reproduce the problem -- could you please post your session info, including the Python pkg versions (e.g. via pip freeze)?

@srw0001
Copy link

srw0001 commented Sep 18, 2024

Both the original version last_modified = object$data$LastModified$strftime and corrected version last_modified = object$data$LastModified$strftime('%Y-%m-%d %H:%M:%S %Z') gave me the error message:
Error in object$data$LastModified$strftime : $ operator is invalid for atomic vectors.

However, I did get the s3_ls() function to work without errors using last_modified = as.character(object$data$LastModified).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants