Open grcatlin opened 3 months ago
Can you please try installing arcpbf from r-universe?
install.packages("arcpbf", repos = c("https://r-arcgis.r-universe.dev", "https://cloud.r-project.org"))
then restart R and try loading your feature service? I believe I fixed this bug previously this week.
Hi there, thanks for the quick response!
On installing dev version from remotes::
remotes::install_github("r-arcgis/arcgislayers", force = TRUE)
remotes::install_github("r-arcgis/arcpbf", force = TRUE)
# restart R
devtools::package_info(c("arcgislayers", "arcpbf")) |>
dplyr::filter(stringr::str_starts(package, "arc")) |>
dplyr::select(package, "ondiskversion", date, source) |>
data.table::as.data.table() |>
kableExtra::kable()
package | ondiskversion | date | source |
---|---|---|---|
arcgislayers | 0.3.0.9000 | 2024-07-20 | Github (r-arcgis/arcgislayers@754bd2d95c76bf3b286c6f765ab2d5318eb0eca5) |
arcgisutils | 0.3.0 | 2024-05-09 | CRAN (R 4.4.1) |
arcpbf | 0.1.3.9000 | 2024-07-20 | Github (r-arcgis/arcpbf@5d1a74b2bce2faeb8002a57a600d8371ee488fbf) |
When trying to arcgislayers::arc_read()
:
Error in `arc_select()`:
! `as.integer(page_size)` must be a whole number or `NULL`, not an empty integer vector.
Backtrace:
▆
1. └─arcgislayers::arc_read(...)
2. └─arcgislayers::arc_select(...)
3. └─arcgislayers:::check_number_whole(...)
4. └─arcgislayers:::.stop_not_number(...)
5. └─arcgislayers:::stop_input_type(...)
6. └─rlang::abort(message, ..., call = call, arg = arg)
https://r-arcgis.r-universe.dev
On installing via install.packages()
:
install.packages("arcpbf", repos = c("https://r-arcgis.r-universe.dev", "https://cloud.r-project.org"))
install.packages("arcgislayers", repos = c("https://r-arcgis.r-universe.dev", "https://cloud.r-project.org"))
# restart R
package | ondiskversion | date | source |
---|---|---|---|
arcgislayers | 0.3.0.9000 | 2024-07-20 | https://r-arcgis.r-universe.dev (R 4.4.1) |
arcgisutils | 0.3.0 | 2024-05-09 | CRAN (R 4.4.1) |
arcpbf | 0.1.3.9000 | 2024-07-20 | https://r-arcgis.r-universe.dev (R 4.4.1) |
I get the same
Error in `arc_select()`:
! `as.integer(page_size)` must be a whole number or `NULL`, not an empty integer vector.
On installing from CRAN:
install.packages("arcpbf", repos = c("https://cloud.r-project.org"))
install.packages("arcgislayers", repos = c("https://cloud.r-project.org"))
# restart R
package | ondiskversion | date | source |
---|---|---|---|
arcgislayers | 0.3.0 | 2024-07-05 | CRAN (R 4.4.1) |
arcgisutils | 0.3.0 | 2024-05-09 | CRAN (R 4.4.1) |
arcpbf | 0.1.3 | 2024-07-10 | CRAN (R 4.4.1) |
arcgislayers::arc_read()
works but give the weird 1969-12-31 17:00:INTEGER
thing.
arcpbf
+ CRAN arcgislayers
On installing dev version of arcpbf
w/ CRAN of arcgislayers
:
package | ondiskversion | date | source |
---|---|---|---|
arcgislayers | 0.3.0 | 2024-07-05 | CRAN (R 4.4.1) |
arcgisutils | 0.3.0 | 2024-05-09 | CRAN (R 4.4.1) |
arcpbf | 0.1.3.9000 | 2024-07-20 | https://r-arcgis.r-universe.dev (R 4.4.1) |
It parses as expected.
Error in `arc_select()`:
! `as.integer(page_size)` must be a whole number or `NULL`, not an empty integer vector.
Describe the bug From commit 553e80b508f1d0a72448e86e06858b3eb381c9f7 onward, integer fields seem to be parsed as date times for some reason. The previous commit (c988b92760833d7593e8be7a2b3dda2a98b348ec) parses normally. However, from 553e80b508f1d0a72448e86e06858b3eb381c9f7 onward, when I hit a integer field it reads as
1969-12-31 17:00:INTEGER
.I.E., I have a temperature field where an observer put in
34
, this now reads as1969-12-31 17:00:34
. This is the same whether usingargislayers::arc_open()
+arcgislayers::arc_select()
or justarcgislayers::arc_read()
.To Reproduce Unfortunately, the feature service in question is sensitive and cannot be shared but here is my general workflow:
Additional context Not sure if it would matter but my feature service is from a Survey123 application where the offending fields are specified as:
and so forth in the xlsform.
Additionally, I don't believe I have any integers >= 100 which may change how it would be parsed?