Comments (6)
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.
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.
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.
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.
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.
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)
- tags and categories for bibtex entry HOT 2
- The LaTeX code inside title would become invalid after `clean_bibtex_str` HOT 3
- Fails to create publication if other publication exists from the same year HOT 1
- Created tags are considered as single tag by Hugo HOT 2
- hugo-academic-cli bibtex import is broken with hugo v0.89.0 HOT 3
- Add support for JSON CSL (web friendly Bibtex equivalent)
- Error: No such file or directory: 'content/publication/.../index.md' HOT 4
- Publication parameter on Journal article HOT 1
- import fails without any output even with verbose param HOT 1
- Install Error
- Issues with folder names while importing bibtex entry HOT 5
- Add support for extra hugo fields to be setup by extra bibtex fields. HOT 1
- Could you please add a `[build-sysem]` section to `pyproject.toml`?
- Hugo Academic CLI v0.8.1 does nothing HOT 3
- text in italics is not transformed to _italics_ in index.md HOT 1
- Feature request: skip duplicated arvix publications HOT 1
- When importing thesis' metadata, if it could also import if it is a B.S., M.S., or Ph.D. Thesis HOT 2
- hugo command usage in bibtext import does not check cmd return HOT 5
- academic 0.7.0 failed to import asserts for wowchemy 5.3.0 HOT 1
- update_wowchemy fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from academic-file-converter.