daroczig / botor

Reticulate wrapper on 'boto3' with convenient helper functions -- aka "boto fo(u)r R"
https://daroczig.github.io/botor
31 stars 5 forks source link

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

Open shrutivardhan opened 3 months ago

shrutivardhan commented 3 months ago

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 commented 3 months ago

Dupe of #18 ???

darsoo commented 1 month ago

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 commented 1 month ago

@darsoo sure, just pushed a638922ba4ee93dac8e440a43808ed668521faf3

daniellehouse-moj commented 3 weeks ago

@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 commented 3 weeks ago

@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 commented 2 weeks ago

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).