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

bbt_write_bib throwing "Error in result$result[[3]]" error #47

Open
M1V0 opened this issue Jan 8, 2024 · 11 comments
Open

bbt_write_bib throwing "Error in result$result[[3]]" error #47

M1V0 opened this issue Jan 8, 2024 · 11 comments

Comments

@M1V0
Copy link

M1V0 commented Jan 8, 2024

Hi,

I have an issue that has only started today affecting multiple previous working RMarkdown documents where I use bbt_write_bib to create bibliography files.

Now when trying to knit a RMarkdown document I get the error:

processing file: 09Discussion.Rmd
  |......................................................................| 100%
Quitting from lines 2-134 (09Discussion.Rmd)
Error in `result$result[[3]]`:
! subscript out of bounds
Backtrace:
 1. rbbt::bbt_write_bib("Bibliography/discussion.json", overwrite = TRUE)
 4. rbbt::bbt_bib(...)
 5. base (local) .action(result$result[[3]])
                                                                                          
Execution halted

This is in R 4.2.2, pandoc 3.1.1, with rbbt 0.0.0.9 - the issue happens across multiple documents - even when the offending line is commented out and a reference to just bibliography: Bibliography/discussion.json is used. Deleting the rbbt line then allows that to render, but I need the overwrite function.

Thanks in advance and apologies if I'm missing any information.

@dmi3kno
Copy link
Contributor

dmi3kno commented Jan 8, 2024

Something has changed in BBT interface. The resulting bib content is no longer in a third element of a vector, but rather in the first one.

Can one of the maintainers confirm the change in the returned BBT JSON and adjust this line

rbbt/R/bbt.R

Line 98 in ec1ebe1

.action(result$result[[3]])

@swalmsley
Copy link

I am having the same issue. Would very much appreciate if this change could be made. Thanks!

@mccarthy-m-g
Copy link

I just ran into this as well. Fortunately @dmi3kno's comment lead me to an easy workaround: Until a change in rbbt is made you can just downgrade BBT, disable automatic updates for BBT, and things should work again.

I successively downgraded from the current version of BBT (v6.7.143) until the error went away at v6.7.140, so that seems to be the most recent version compatible with rbbt right now.

@M1V0
Copy link
Author

M1V0 commented Jan 12, 2024

I replicated @mccarthy-m-g's workaround - so thank you! That saves me a headache when submitting my PhD next month.

@bbartholdy
Copy link

Can also confirm that BBT v6.7.140 works for me! Also saved my PhD dissertation! Thanks @mccarthy-m-g 😄

wmoldham added a commit to wmoldham/rbbt that referenced this issue Jan 25, 2024
@peranti
Copy link

peranti commented Feb 5, 2024

Hi @bbartholdy @M1V0 @mccarthy-m-g, could you please advise me on how to install BBT v6.7.140? Many thanks!

@nikitoshina
Copy link

@peranti download .xpi file and follow the regular installation instructions.

@heike
Copy link
Contributor

heike commented Feb 23, 2024

@wmoldham put in a pull request - that fixes the bug. Thank you @wmoldham!
Until @paleolimbot is accepting the pull request, installing from the forked repo will fix things remotes::install_github("wmoldham/rbbt")

@cjvanlissa
Copy link

Stumbled upon this issue; I independently confirm this bug and my fix is the same as wmoldham's. Their PR can be accepted.

NewGraphEnvironment added a commit to NewGraphEnvironment/rbbt that referenced this issue May 29, 2024
@cpsyctc2
Copy link

I am not sufficiently knowledgeable about the internals to understand the comment from NewGraphEnvironment but I can confirm that the problem was still there with a copy of the package that I pulled from paleolimbot/rbbt yesterday but the problem goes away using wmoldham/rbbt (thanks for that heike and wmoldham). rbbt is so much better than the insert citations facility in "visual" Rstudio that I do hope it will continue to be maintained and even developed. I am happy to do testing on Linux (Ubuntu 22.04) and perhaps with suggestions for more documentation Windoze but I don't have skills for the programming. Huge thanks to all who have created it so far. Chris

@DeaconOfBiology
Copy link

I just ran into this as well. Fortunately @dmi3kno's comment lead me to an easy workaround: Until a change in rbbt is made you can just downgrade BBT, disable automatic updates for BBT, and things should work again.

I successively downgraded from the current version of BBT (v6.7.143) until the error went away at v6.7.140, so that seems to be the most recent version compatible with rbbt right now.

Thanks! Been troubleshooting for an hour now, and found your suggested fix.

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