Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error in callFun: argument "location" is missing #76

Open
ogsteele opened this issue Nov 11, 2020 · 4 comments
Open

Error in callFun: argument "location" is missing #76

ogsteele opened this issue Nov 11, 2020 · 4 comments

Comments

@ogsteele
Copy link

Hi,

Hope you're able to help. Love the idea of the package, yet am struggling to integrate it successfully. I'm currently unable to get Citr to place any in-text citations within my Markdown documents

Citr nicely links to Zotero, sees my BetterBibTex keys and allows me to select the references of interest. However, when clicking Insert Citation I am met with the following error and no in-text citation.

Warning: Error in callFun: argument "location" is missing, with no default
  76: callFun`
  75: rstudioapi::insertText
  74: observeEventHandler
   3: shiny::runApp
   2: runGadget
   1: citr:::insert_citation
Error in execCallbacks(timeoutSecs, all, loop$id) : 
  invoke_wrapped: throwing std::runtime_error

May not be relevant, but Citr appears to correctly populate and update a references.bib file despite the lack of citation. I was obviously expecting an in-text citation and would really appreciate your help fixing this.

Installed BetterBibTex, RefManageR and bibtex this morning alongside Citr - so I'm assuming they're all up to date.

Let me know if you need any more information from me, really appreciate your time!

Cheers,
Oli

@rmtrane
Copy link

rmtrane commented Nov 15, 2020

I had a similar problem. I found a temporary solution by including location = context$selection[[1]]$range in the call to rstudioapi::insertText (see here master...rmtrane:master).

I'm not sure this is the solution, but it is a solution that has worked for me so far.

@crsh
Copy link
Owner

crsh commented Nov 16, 2020

Hi Oli, which version of RStudio are you using?

Thanks, rmtrane, for chiming in. I'll take a look at your solution.

@rmtrane
Copy link

rmtrane commented Nov 16, 2020

@crsh No, thank you for this awesome package!

Also, I'm on version 1.4.953 of RStudio.

@ogsteele
Copy link
Author

ogsteele commented Nov 16, 2020

Second that @rmtrane - thanks for the awesome package @crsh ! Also, thanks for the suggestion, I haven't had a chance to try and implement it but will try and get round to it in the next couple of days.

I'm on version 1.3.1073 which I think is the latest version available for OSX.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants