Git Product home page Git Product logo

Comments (6)

gcushen avatar gcushen commented on June 7, 2024

Please state your versions of Academic Admin and Python as well as providing the full traceback, which should locate the specific cause of the error.

from academic-file-converter.

aledeluca avatar aledeluca commented on June 7, 2024

OK, first of all: I tried on a different, Windows machine and everything worked. So, good news.

Right now I can't access the other machine (a Mac) where I had trouble, so I can't give you precise answers (but I will be able tomorrow). Anyway, when I opened this issue I had just installed Python3 from Homebrew, and Academic Admin from there using
pip3 install -U academic
so this might already be enough for you to understand the versions involved. I will write the full traceback (sorry for not including it earlier) tomorrow. Thank you very much for your help, and for developing Academic.

from academic-file-converter.

dkobashi avatar dkobashi commented on June 7, 2024

I had the same problem on my Mac OS X a few days ago after I installed python 3 with homebrew.

Then I installed miniconda3 (mini version of Anaconda Python 3) on Mac and installed academic admin tool (with pip install -U academic. I did not find pip3, but miniconda3 uses python3 by default. So pip should be equivalent to pip3. Make sure python and pip are from anaconda/miniconda3 before executing it). Then the error is gone and I was able to create a publication list.

You may want to try that, too. It is easy to install and use miniconda (or anaconda) python.

So the problem may be something to do with python 3 by homebrew.

from academic-file-converter.

aledeluca avatar aledeluca commented on June 7, 2024

Sorry for the delay.
Python v. 3.7.2 from Homebrew. Academic Admin v. 0.2.6.
Full traceback:

Traceback (most recent call last):
  File "/usr/local/bin/academic", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/academic/cli.py", line 77, in main
    import_bibtex(args.bibtex, pub_dir=args.publication_dir, featured=args.featured, overwrite=args.overwrite)
  File "/usr/local/lib/python3.7/site-packages/academic/cli.py", line 92, in import_bibtex
    bib_database = bibtexparser.load(bibtex_file, parser=parser)
  File "/usr/local/lib/python3.7/site-packages/bibtexparser/__init__.py", line 71, in load
    return parser.parse_file(bibtex_file)
  File "/usr/local/lib/python3.7/site-packages/bibtexparser/bparser.py", line 165, in parse_file
    return self.parse(file.read(), partial=partial)
  File "/usr/local/lib/python3.7/site-packages/bibtexparser/bparser.py", line 147, in parse
    self._expr.parseFile(bibtex_file_obj)
  File "/usr/local/lib/python3.7/site-packages/bibtexparser/bibtexexpression.py", line 263, in parseFile
    return self.main_expression.parseFile(file_obj, parseAll=True)
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 2362, in parseFile
    return self.parseString(file_contents, parseAll)
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1804, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1548, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 4361, in parseImpl
    return super(ZeroOrMore, self).parseImpl(instring, loc, doActions)
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 4291, in parseImpl
    loc, tokens = self_expr_parse( instring, loc, doActions, callPreParse=False )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1548, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 3871, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1548, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 3722, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1548, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 3871, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1548, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 3722, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1548, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 3705, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1581, in _parseNoCache
    tokens = fn( instring, tokensStart, retTokens )
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1203, in wrapper
    ret = func(*args[limit[0]:])
  File "/usr/local/lib/python3.7/site-packages/bibtexparser/bibtexexpression.py", line 68, in field_to_pair
    strip_after_new_lines(f.get('Value')))
  File "/usr/local/lib/python3.7/site-packages/bibtexparser/bibtexexpression.py", line 25, in strip_after_new_lines
    return _strip_after_new_lines(s)
  File "/usr/local/lib/python3.7/site-packages/bibtexparser/bibtexexpression.py", line 10, in _strip_after_new_lines
    lines = s.splitlines()
TypeError: 'str' object is not callable

from academic-file-converter.

gcushen avatar gcushen commented on June 7, 2024

Python 3.7 makes some major breaking changes to Python. Perhaps the dependency version of bibtexparser is incompatible with Python 3.7+...

from academic-file-converter.

gcushen avatar gcushen commented on June 7, 2024

It was a bug upstream in Bibtexparser that has now been fixed: sciunto-org/python-bibtexparser#225 . Updating your Bibtexparser dependency or re-installing Academic Admin in a fresh environment should fix it.

from academic-file-converter.

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.