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 in order(names(metadata)): argument 1 is not a vector #99

Open
joelnitta opened this issue Dec 26, 2023 · 1 comment
Open

Error in order(names(metadata)): argument 1 is not a vector #99

joelnitta opened this issue Dec 26, 2023 · 1 comment

Comments

@joelnitta
Copy link

I think this may be because I didn't specify metadata for the upload. But my actual particular use-case is uploading (updating) to an existing figshare dataset that already has metadata. So I'd rather not have to specify metadata each time. Anyways that's just a guess, not actually sure what's going on here. Also, please note that the file does actually upload despite the error message.

data <- as.character(runif(100))
temp_file <- tempfile(fileext = ".txt")
writeLines(data, temp_file)
cli <- deposits::depositsClient$new(service = "figshare")
cli$deposit_retrieve(24903468)
cli$deposit_upload_file(
    path = temp_file,
    deposit_id = 24903468,
    overwrite = TRUE,
    compress = "no"
  )
#> Error in order(names(metadata)): argument 1 is not a vector

Created on 2023-12-26 with reprex v2.0.2

Session info

sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.1 (2023-06-16)
#>  os       Ubuntu 22.04.3 LTS
#>  system   x86_64, linux-gnu
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       Etc/UTC
#>  date     2023-12-26
#>  pandoc   3.1.6.1 @ /usr/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version   date (UTC) lib source
#>  backports     1.4.1     2021-12-13 [1] RSPM (R 4.3.0)
#>  checkmate     2.2.0     2023-04-27 [1] RSPM (R 4.3.0)
#>  cli           3.6.1     2023-03-23 [1] RSPM (R 4.3.0)
#>  curl          5.0.1     2023-06-07 [1] RSPM (R 4.3.0)
#>  deposits      0.2.1.052 2023-12-26 [1] Github (ropenscilabs/deposits@bc3ca40)
#>  digest        0.6.33    2023-07-07 [1] RSPM (R 4.3.0)
#>  evaluate      0.21      2023-05-05 [1] RSPM (R 4.3.0)
#>  fansi         1.0.4     2023-01-22 [1] RSPM (R 4.3.0)
#>  fastmap       1.1.1     2023-02-24 [1] RSPM (R 4.3.0)
#>  fs            1.6.3     2023-07-20 [1] RSPM (R 4.3.0)
#>  glue          1.6.2     2022-02-24 [1] RSPM (R 4.3.0)
#>  here          1.0.1     2020-12-13 [1] RSPM (R 4.3.0)
#>  htmltools     0.5.5     2023-03-23 [1] RSPM (R 4.3.0)
#>  httr2         0.2.3     2023-05-08 [1] RSPM (R 4.3.0)
#>  jsonlite      1.8.7     2023-06-29 [1] RSPM (R 4.3.0)
#>  knitr         1.43      2023-05-25 [1] RSPM (R 4.3.0)
#>  lifecycle     1.0.3     2022-10-07 [1] RSPM (R 4.3.0)
#>  magrittr      2.0.3     2022-03-30 [1] RSPM (R 4.3.0)
#>  pillar        1.9.0     2023-03-22 [1] RSPM (R 4.3.0)
#>  pkgconfig     2.0.3     2019-09-22 [1] RSPM (R 4.3.0)
#>  purrr         1.0.1     2023-01-10 [1] RSPM (R 4.3.0)
#>  R.cache       0.16.0    2022-07-21 [1] RSPM (R 4.3.0)
#>  R.methodsS3   1.8.2     2022-06-13 [1] RSPM (R 4.3.0)
#>  R.oo          1.25.0    2022-06-12 [1] RSPM (R 4.3.0)
#>  R.utils       2.12.2    2022-11-11 [1] RSPM (R 4.3.0)
#>  R6            2.5.1     2021-08-19 [1] RSPM (R 4.3.0)
#>  rappdirs      0.3.3     2021-01-31 [1] RSPM (R 4.3.0)
#>  reprex        2.0.2     2022-08-17 [1] RSPM (R 4.3.0)
#>  rlang         1.1.1     2023-04-28 [1] RSPM (R 4.3.0)
#>  rmarkdown     2.23      2023-07-01 [1] RSPM (R 4.3.0)
#>  rprojroot     2.0.3     2022-04-02 [1] RSPM (R 4.3.0)
#>  sessioninfo   1.2.2     2021-12-06 [1] RSPM (R 4.3.0)
#>  styler        1.10.1    2023-06-05 [1] RSPM (R 4.3.0)
#>  tibble        3.2.1     2023-03-20 [1] RSPM (R 4.3.0)
#>  utf8          1.2.3     2023-01-31 [1] RSPM (R 4.3.0)
#>  vctrs         0.6.3     2023-06-14 [1] RSPM (R 4.3.0)
#>  withr         2.5.0     2022-03-03 [1] RSPM (R 4.3.0)
#>  xfun          0.39      2023-04-20 [1] RSPM (R 4.3.0)
#>  yaml          2.3.7     2023-01-23 [1] RSPM (R 4.3.0)
#> 
#>  [1] /renv/R-4.3/x86_64-pc-linux-gnu
#>  [2] /root/.cache/R/renv/sandbox/R-4.3/x86_64-pc-linux-gnu/25ebdc09
#>  [3] /usr/local/lib/R/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────
@mpadge
Copy link
Member

mpadge commented Jan 5, 2024

Thanks @joelnitta, I'll get on to this one, and #100, next week.

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

2 participants