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

bind_rows() error in reading library #3

Open
sjgknight opened this issue Nov 7, 2023 · 1 comment
Open

bind_rows() error in reading library #3

sjgknight opened this issue Nov 7, 2023 · 1 comment

Comments

@sjgknight
Copy link

Trying to do something with the library I previously accessed and now when I try and read it using the Zotero function I get an error... I'm not sure how to go about debugging this.

Zotero(user = F, id = group_id, silent = F, index = F, library = T)
Searching for collections 
Found 8 collections 
The Zotero list contains: 8 collections, 0 items, and 0 attachments 
Searching for all items in library 
Found 327 items 
Need 3 addtional queries to gather items 
Error in `dplyr::bind_rows()`:
! Can't combine `..1$relations$dc:replaces` <list> and `..2$relations$dc:replaces` <character>.
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/vctrs_error_ptype2>
Error in `dplyr::bind_rows()`:
! Can't combine `..1$relations$dc:replaces` <list> and `..2$relations$dc:replaces` <character>.
---
Backtrace:
    x
 1. \-c2z::Zotero(user = F, id = group_id, silent = F, index = F, library = T)
 2.   \-c2z::ZoteroLibrary(...)
 3.     \-c2z::ZoteroGet(...)
 4.       \-c2z:::AddAppend(...)
 5.         +-dplyr::distinct(dplyr::bind_rows(old.data, data))
 6.         \-dplyr::bind_rows(old.data, data)
Run rlang::last_trace(drop = FALSE) to see 10 hidden frames.
> rlang::last_trace(drop = FALSE)
<error/vctrs_error_ptype2>
Error in `dplyr::bind_rows()`:
! Can't combine `..1$relations$dc:replaces` <list> and `..2$relations$dc:replaces` <character>.
---
Backtrace:
     x
  1. +-c2z::Zotero(user = F, id = group_id, silent = F, index = F, library = T)
  2. | \-c2z::ZoteroLibrary(...)
  3. |   \-c2z::ZoteroGet(...)
  4. |     \-c2z:::AddAppend(...)
  5. |       +-dplyr::distinct(dplyr::bind_rows(old.data, data))
  6. |       \-dplyr::bind_rows(old.data, data)
  7. |         \-vctrs::vec_rbind(!!!dots, .names_to = .id, .error_call = current_env())
  8. \-vctrs (local) `<fn>`()
  9.   \-vctrs::vec_default_ptype2(...)
 10.     +-base::withRestarts(...)
 11.     | \-base (local) withOneRestart(expr, restarts[[1L]])
 12.     |   \-base (local) doWithOneRestart(return(expr), restart)
 13.     \-vctrs::stop_incompatible_type(...)
 14.       \-vctrs:::stop_incompatible(...)
 15.         \-vctrs:::stop_vctrs(...)
 16.           \-rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
@oeysan
Copy link
Owner

oeysan commented Nov 9, 2023

I could replicate the isse and it was due to an error in the formatting of the relations entry (which is not very thoroughly documented in the Zotero API). Hopefully, the latest commit should handle empty relations as well as merged and related entries.

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