Closed hpay closed 9 months ago
Thanks for trying out this tool and happy new year! Happy to help debug.
This looks like the pybtex function couldn't read an entry of the .bib file. Could you please attach here or send me the .bib file you're using? It could be as simple as fixing the formatting of that entry.
Thanks! I'd appreciate that. The .bib file is attached here (after renaming the extension to .txt)
I generated it by changing the citation style for mendeley to bibtex, generating a bibliography in my word document, and copy-pasting to a text file
Got it, thanks!
Looks like some formatting issues got introduced when the citation styles were auto-converted. The line number at the bottom of that long error message will tell you what line the code got stuck in the bib file.
Most of the errors come from spaces surrounding nobiliary particles in surnames (e.g. de, du, van), which need to be replaced with underscores or else the parser won't be able to recognize the start of the next field. Other minor formatting issues for spaces instead of underscores between et al. in the entry ID tag and one line that contained two entries.
I went through and fixed these, see attached .txt file Bibtex_utf8.txt.
And making note of a few examples below in case it's useful for future reference.
Line 3, change Bagnall_McElvain_Faulstich_du Lac_2008 to Bagnall_McElvain_Faulstich_du_Lac_2008 Line 17, change lopath_Badura_De Zeeuw_Brunel_2014 to lopath_Badura_De_Zeeuw_Brunel_2014 etc.
Line 85: underscored et_al.2011 instead of et al.2011
Line 31, there's two entries in one line. Added line break before the next @article
P.S. I find it useful to open the .bib file in something like Sublime Text or a .tex editor because they colorcode the fields for you, which makes it much easier to spot when there's an inconsistency in the formatting
Feel free to let me know if there's any other issues you run into, happy to help!
Some more issues run into after these formatting ones: the entries Kawano_Shidara_Watanabe_Yamane_1994 and Newsome_Wurtz_Komatsu_1988 have issues with their DOI numbers, which will return an error like "DOI specified as 2305-2324 but must be of the form: 10.prefix\/suffix where prefix is 4 or more digits and suffix is a string"
To resolve, delete the DOI field for those entries or replace them with the right ones by manually searching for them like below:
@article{Kawano_Shidara_Watanabe_Yamane_1994, title={Neural activity in cortical area MST of alert monkey during ocular following responses}, volume={71}, ISBN={0022-3077 (Print)r0022-3077 (Linking)}, ISSN={0022-3077}, DOI={10.1152/jn.1994.71.6.2305}, number={6}, journal={Journal of Neurophysiology}, author={Kawano, Kenji and Shidara, M. and Watanabe, Y and Yamane, S}, year={1994}, pages={2305–2324} }
@article{Newsome_Wurtz_Komatsu_1988, title={Relation of cortical areas MT and MST to pursuit eye movements. II. Differentiation of retinal from extraretinal inputs}, volume={60}, ISBN={0022-3077 (Print)r0022-3077 (Linking)}, ISSN={00223077}, DOI={10.1152/jn.1988.60.2.604}, number={2}, journal={Journal of Neurophysiology}, author={Newsome, W. T. and Wurtz, R. H. and Komatsu, H.}, year={1988}, pages={604–620} }
Thank you! I ran through it without further errors. I did have one additional question that I'll post as a separate issue.
Hi! I'm trying to quickly run cleanBib.ipynb to analyze a manuscript in progress. I get an error in the second block of code. I don't have a huge amount of experience with python so I'm not sure how to debug. Any thoughts?
Error message is below.