Giter VIP home page Giter VIP logo

Comments (16)

crsh avatar crsh commented on September 24, 2024 1

Ah, yes, I've had this kind of issue come up before. This is a limitation of the R package I use (the only one I know) to read the Bib(La)TeX files. With Better Bib(La)TeX you can set an option to not export the abstract field, which should fix this problem once and for all without requiring manual labor.

bbt_omit_abstract

I should probably document this somewhere...

from citr.

crsh avatar crsh commented on September 24, 2024 1

You're welcome, I'm glad it works now, but I'm not sure that this is how it should work with BBT... No idea what's going on there. 🙃

I'll close this issue for now. Feel free to reopen if you experience similar issues again.

from citr.

crsh avatar crsh commented on September 24, 2024

Hi Clemens, thanks for the feedback! I assume this is related to long bib-entries. The underlying functions I use to read the BibTeX files run into problems with those sometimes. I've been trying to get around this, but it seems it failed in your case. Could you do me a favor and send me a copy of the files by accessing them in your browser? For example, try http://localhost:23119/better-bibtex/library?/9061/library.bibtex.

from citr.

nevrome avatar nevrome commented on September 24, 2024

Thanks Frederik. I wrote you an email.

from citr.

nevrome avatar nevrome commented on September 24, 2024

Is there a way to locate the entries in my database that cause problems?

from citr.

crsh avatar crsh commented on September 24, 2024

Hi Clemens, sorry I've been swamped. I would try the divide-and-conquer-strategy. Cut the file in half and see if you can read it. If you cannot, cut the remainder in half and so on.

from citr.

crsh avatar crsh commented on September 24, 2024

Let me know if you can locate the problem.

from citr.

nevrome avatar nevrome commented on September 24, 2024

OK - that's a strategy... I guess I could maybe even automate this somehow... Hm.

from citr.

nevrome avatar nevrome commented on September 24, 2024

There are several citations in my DB with very long entries in the abstract field. Maybe that caused some of the problems. I decided now to create a small, clean subset of the literature that I need for the task at hand. That works flawlessly with citr, is faster and I don't have to clean my complete database.

Altogether zotero gave me a pretty hard time in the last couple of days. I'm disillusioned with group libraries.

Thank you for the help @crsh! The issue can be closed although I would not consider this problem solved.

from citr.

nevrome avatar nevrome commented on September 24, 2024

Cool - good to know. I get a new error message now:

Listening on http://127.0.0.1:5052
Warning in do_read_bib(file, encoding = .Encoding, srcfile) :
  
bASQEt1ZQW5hQEgcTxGlbG7pzYGk9eSr.bib:2:0
	syntax error, unexpected $end
	Dropping the entry `(null)` (starting at line 0) 
Warning: Error in do_read_bib: unprotect_ptr: pointer not found
Stack trace (innermost first):
    107: do_read_bib
    106: RefManageR::ReadBib
    105: import_bbt_piecewise
    104: load_betterbiblatex_bib
    103: eval
    102: eval
    101: shiny::withProgress
    100: <reactive>
     89: bibliography
     88: tag
     87: tags$a
     86: actionLink
     85: tag
     84: tags$span
     83: span
     82: helpText
     81: renderUI
     80: func
     79: origRenderFunc
     78: output$zotero_status
      3: shiny::runApp
      2: runGadget
      1: citr:::insert_citation
Warning: Error in do_read_bib: unprotect_ptr: pointer not found
Stack trace (innermost first):
    89: <Anonymous>
    88: stop
    87: bibliography
    86: force
    85: need
    84: lapply
    83: sapply
    82: validate
    81: renderText
    80: func
    79: origRenderFunc
    78: output$read_error
     3: shiny::runApp
     2: runGadget
     1: citr:::insert_citation
Warning: Error in do_read_bib: unprotect_ptr: pointer not found
Stack trace (innermost first):
    61: <Anonymous>
    60: stop
    59: bibliography
    58: observerFunc
     3: shiny::runApp
     2: runGadget
     1: citr:::insert_citation

bASQEt1ZQW5hQEgcTxGlbG7pzYGk9eSr.bib is created and not deleted. It contains only the line

translation failed

from citr.

crsh avatar crsh commented on September 24, 2024

Not sure what's going on and I can't really address the issue unless I can reproduce it. Could you upload a copy of the bibfile that produces the error? You can access the file at http://localhost:23119/better-bibtex/library?/ + the library ID + /library.bibtex.

from citr.

nevrome avatar nevrome commented on September 24, 2024

I already sent you this via email as far as I remember.

from citr.

crsh avatar crsh commented on September 24, 2024

But this error now occured after changing the export settings, no? So it would yield a different BibTeX file and facilitate pinpointing the problem.

from citr.

nevrome avatar nevrome commented on September 24, 2024

You're right. I understand. Sent you another mail. Thanks!

from citr.

crsh avatar crsh commented on September 24, 2024

Hi Clemens, I finally found some time to look into this again. The new file you sent me (without the abstracts) works for me, whereas the old file does not.

The problem with very long fields in .bib-files is a known issue of bibtex::read.bib() that citr builds on. I don't think there is anything I can do about it. I have, however, included a note on how to fix this problem to the README.

Concerning the new file: Could you do me a favor and try one more time? I have noticed that once read.bib() fails with a lex-error it is sometimes necessary to restart the R session. Otherwise reading of any .bib-file fails. It's the first thing I can think of, why this would work on my machine but not yours.

from citr.

nevrome avatar nevrome commented on September 24, 2024

I tried and first of all it failed again with the not very speaking error message mentioned above:
Warning: Error in do_read_bib: unprotect_ptr: pointer not found

Then I selected the library of interest in the library tree panel of Zotero. That did the trick. It's working now. GUI magic. I guess selecting it triggers BetterBibtex to provide the bibfile. Something pretty harmless and still annoying. Maybe you even mention this somewhere in your description and I just forgot the obvious.

Thanks a lot for your help!

from citr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.