AttributeError: 'NoneType' object has no attribute 'info'
jasonmcewen opened this issue · comments
Just getting familiar with Academic and academic-admin
to consider using to update my academic website. It all looks great!
But I'm having some issues importing my publications from a bib file. For my current website I do this using bib2html, with some bespoke scripts. academic-admin
looks like a much better way to do this so I'm keen to switch, but it doesn't seem to be working for me at present. Not sure if I have installed correctly(?), although I did follow the instructions on the website.
Here is the traceback when running inside a cloned version of academic:
> academic import --bibtex mybibs.bib -v
08:32:38PM DEBUG: Found Entry: ['article', 'id', {'YEAR': '2019', 'JOURNAL': 'Journal', 'TITLE': 'Title here', 'AUTHOR': 'A. N. Other'}]
08:32:38PM DEBUG: Apply customizations and return dict
Traceback (most recent call last):
File "/usr/local/bin/academic", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/academic/cli.py", line 94, in main
import_bibtex(args.bibtex, pub_dir=args.publication_dir, featured=args.featured, overwrite=args.overwrite, normalize=args.normalize)
File "/usr/local/lib/python3.7/site-packages/academic/cli.py", line 111, in import_bibtex
parse_bibtex_entry(entry, pub_dir=pub_dir, featured=featured, overwrite=overwrite, normalize=normalize)
File "/usr/local/lib/python3.7/site-packages/academic/cli.py", line 116, in parse_bibtex_entry
log.info(f"Parsing entry {entry['ID']}")
AttributeError: 'NoneType' object has no attribute 'info'
The test bib files simply contains
@article{id,
AUTHOR = "A. N. Other",
TITLE = "Title here",
JOURNAL = "Journal",
YEAR = "2019"
}
I'm running Python 3.7 (installed via anaconda) on Mac OS X Mojave.
@gcushen Thanks for the rapid fix! Just picked up your recent changes and all working well on my side now. I'm loving hugo-academic already! Finally gave me the push I needed to refresh my academic website for the first time in about 10 years!