botor icon indicating copy to clipboard operation
botor copied to clipboard

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

Open shrutivardhan opened this issue 1 year ago • 6 comments

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

shrutivardhan avatar Jul 02 '24 09:07 shrutivardhan

Dupe of #18 ???

nfultz avatar Jul 04 '24 17:07 nfultz

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?

darsoo avatar Aug 08 '24 11:08 darsoo

@darsoo sure, just pushed a638922ba4ee93dac8e440a43808ed668521faf3

daroczig avatar Aug 08 '24 13:08 daroczig

@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?

daniellehouse-moj avatar Sep 12 '24 16:09 daniellehouse-moj

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

daroczig avatar Sep 13 '24 08:09 daroczig

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

srw0001 avatar Sep 18 '24 17:09 srw0001

Indeed sounds like a dupe of #18, for which a CRAN release is going live today. So thus I'm closing this ticket, but please reopen if the problem persists with some further debug info (e.g. pip freeze).

daroczig avatar Jan 24 '25 12:01 daroczig