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 #54

Closed
jonas-frey opened this issue Oct 2, 2021 · 1 comment · Fixed by #55
Closed

Error #54

jonas-frey opened this issue Oct 2, 2021 · 1 comment · Fixed by #55
Labels

Comments

@jonas-frey
Copy link

jonas-frey commented Oct 2, 2021

Describe the bug
Just tried the script with a small bibtex file and it gives the error message

INFO: Reading references from 'test.bib'
INFO: Filtering by references found in 'references.aux'
WARNING: Aux file 'references.aux' doesn't exist -> not restricting entries
Traceback (most recent call last):
  File "/home/jonas/shared/bin/biblatex_check.py", line 473, in <module>
    handleEntryEnding(bibLineNumber, bibLine)
  File "/home/jonas/shared/bin/biblatex_check.py", line 355, in handleEntryEnding
    entryProblemsHTML = generateEntryProblemsHTML(
  File "/home/jonas/shared/bin/biblatex_check.py", line 243, in generateEntryProblemsHTML
    html += "<div class='reference'>" + title + " (" + author + ")"
TypeError: can only concatenate str (not "filter") to str

I'm using ubuntu 21.04 and replaced the python in the first line of the script by a python3.

To Reproduce
Execute the script with the command line

biblatex_check.py -b test.bib

where the file test.bib contains the following:

@book {hartshorne1977algebraic,
    AUTHOR = {Hartshorne, R.},
     TITLE = {Algebraic geometry},
      NOTE = {Graduate Texts in Mathematics, No. 52},
 PUBLISHER = {Springer-Verlag, New York-Heidelberg},
      YEAR = {1977},
     PAGES = {xvi+496},
      ISBN = {0-387-90244-9},
   MRCLASS = {14-01},
  MRNUMBER = {0463157 (57 \#3116)},
MRREVIEWER = {Robert Speiser},
}

Expected behavior

Should tell me that the bibtex file is correct.

@jonas-frey jonas-frey added the bug label Oct 2, 2021
@Pezmc
Copy link
Owner

Pezmc commented Oct 7, 2021

Thank you for the detailed writeup, I can confirm I was able to reproduce locally when using Python 3.9 (but not using 2.0).

/biblatex_check.py -b test.bib
INFO: Reading references from 'test.bib'
INFO: Filtering by references found in 'references.aux'
WARNING: Aux file 'references.aux' doesn't exist -> not restricting entries
Traceback (most recent call last):
  File "/Users/pezcuckow/Git/BibLatex-Check/./biblatex_check.py", line 473, in <module>
    handleEntryEnding(bibLineNumber, bibLine)
  File "/Users/pezcuckow/Git/BibLatex-Check/./biblatex_check.py", line 355, in handleEntryEnding
    entryProblemsHTML = generateEntryProblemsHTML(
  File "/Users/pezcuckow/Git/BibLatex-Check/./biblatex_check.py", line 243, in generateEntryProblemsHTML
    html += "<div class='reference'>" + title + " (" + author + ")"
TypeError: can only concatenate str (not "filter") to str

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

Successfully merging a pull request may close this issue.

2 participants