Bibtex - Import pdf not found
Hai everybody,
I am trying to move from Citavi to Zotero, via bibtex.
My bibtex-entries look like this:
@book{Abebe.2006,
author = {Abebe, Eyualem and Andrássy, István and Traunspurger, Walter},
year = {2006},
title = {Freshwater nematodes: Ecology and taxonomy},
keywords = {Freshwater nematodes;EBOOK},
address = {Wallingford and UK and Cambridge and MA},
publisher = {CABI Pub},
isbn = {0851990096},
institution = {{ebrary, Inc}},
file = {Freshwater nematodes_Abebe_2006:/media/sda7/Documents/Citavi 3/Projects/Komplett_Liste/CitaviFiles/Freshwater nematodes_Abebe_2006.pdf:PDF}
}
When I open the bibtex-file with JabRef the attached pdf are recognized and I can open them - everything fine.
When I import this bibtex file to zotero, it shows me the pdf-icon, however when I klick on it (to open the pdf) it says:
'The attached file could not be found.
It may have been moved or deleted outside of Zotero'
The debug-output of zotero says:
'Failed to load native module at path '/opt/Zotero_linux-x86_64/xulrunner/components/libmozgnome.so': (80004005) libnotify.so.1: cannot open shared object file: No such file or directory
[ Places Maintenance ]
> Integrity check
+ The database is sane
> Coherence check
+ The database is coherent
[JavaScript Error: "not well-formed" {file: "moz-nullprincipal:{52e7a1ef-eccf-4f87-bdc9-4927c8896323}" line: 1 column: 1 source: "@book{Nollet.2010,"}]
[JavaScript Error: "not well-formed" {file: "moz-nullprincipal:{55c5784b-d4f1-44a4-bec9-b27b7cbf2092}" line: 1 column: 1 source: "@book{Nollet.2010,"}]
[JavaScript Error: "not well-formed" {file: "moz-nullprincipal:{55c5784b-d4f1-44a4-bec9-b27b7cbf2092}" line: 1 column: 1 source: "@book{Nollet.2010,"}]
version => 3.0.3, platform => Linux x86_64, oscpu => Linux x86_64, locale => en-US, appName => Zotero, appVersion => 3.0.3
=========================================================
(2)(+0012486): Attachment file '/home/edisz/Documents/Literature/storage/TMCZDBXE/Freshwater nematodes_Abebe_2006.pdf' not found'
So Zotero looks in my datadirectory for the pdf, but cant find it there. One thing is perhabs that zotero does not copy the pdfs into the data directory, or it doesnot look in the path of the bibtex-file.
Any suggestions how to fix this?
I am trying to move from Citavi to Zotero, via bibtex.
My bibtex-entries look like this:
@book{Abebe.2006,
author = {Abebe, Eyualem and Andrássy, István and Traunspurger, Walter},
year = {2006},
title = {Freshwater nematodes: Ecology and taxonomy},
keywords = {Freshwater nematodes;EBOOK},
address = {Wallingford and UK and Cambridge and MA},
publisher = {CABI Pub},
isbn = {0851990096},
institution = {{ebrary, Inc}},
file = {Freshwater nematodes_Abebe_2006:/media/sda7/Documents/Citavi 3/Projects/Komplett_Liste/CitaviFiles/Freshwater nematodes_Abebe_2006.pdf:PDF}
}
When I open the bibtex-file with JabRef the attached pdf are recognized and I can open them - everything fine.
When I import this bibtex file to zotero, it shows me the pdf-icon, however when I klick on it (to open the pdf) it says:
'The attached file could not be found.
It may have been moved or deleted outside of Zotero'
The debug-output of zotero says:
'Failed to load native module at path '/opt/Zotero_linux-x86_64/xulrunner/components/libmozgnome.so': (80004005) libnotify.so.1: cannot open shared object file: No such file or directory
[ Places Maintenance ]
> Integrity check
+ The database is sane
> Coherence check
+ The database is coherent
[JavaScript Error: "not well-formed" {file: "moz-nullprincipal:{52e7a1ef-eccf-4f87-bdc9-4927c8896323}" line: 1 column: 1 source: "@book{Nollet.2010,"}]
[JavaScript Error: "not well-formed" {file: "moz-nullprincipal:{55c5784b-d4f1-44a4-bec9-b27b7cbf2092}" line: 1 column: 1 source: "@book{Nollet.2010,"}]
[JavaScript Error: "not well-formed" {file: "moz-nullprincipal:{55c5784b-d4f1-44a4-bec9-b27b7cbf2092}" line: 1 column: 1 source: "@book{Nollet.2010,"}]
version => 3.0.3, platform => Linux x86_64, oscpu => Linux x86_64, locale => en-US, appName => Zotero, appVersion => 3.0.3
=========================================================
(2)(+0012486): Attachment file '/home/edisz/Documents/Literature/storage/TMCZDBXE/Freshwater nematodes_Abebe_2006.pdf' not found'
So Zotero looks in my datadirectory for the pdf, but cant find it there. One thing is perhabs that zotero does not copy the pdfs into the data directory, or it doesnot look in the path of the bibtex-file.
Any suggestions how to fix this?
You could also see if the file-path or the name of the PDF matters.
Attachment file '/home/edisz/.zotero/zotero/fx53y7ar.default/zotero/storage/VE23KPGB/Freshwater nematodes_Abebe_2006.pdf' not found
Also, the same when as root.
Thanks for your help!
(3)(+0000001): Translate: Initializing RDF data store
(2)(+0000001): Translate: Detect using Bibliontology RDF failed:
thrown exception => Translate: No RDF found
url => /home/edisz/Documents/Literature/citavi_db_export/ebooks_db_out2.bib
downloadAssociatedFiles => true
automaticSnapshots => true
(4)(+0000000): Translate: Parsing code for MODS
(2)(+0000006): Translate: Detect using MODS failed:
fileName =>
lineNumber => 1
string => SyntaxError: unexpected end of XML entity
url => /home/edisz/Documents/Literature/citavi_db_export/ebooks_db_out2.bib
downloadAssociatedFiles => true
automaticSnapshots => true
(4)(+0000000): Translate: Parsing code for Bookmarks
(4)(+0000002): Translate: Parsing code for CTX
(4)(+0000002): Translate: Parsing code for ISI Web of Knowledge
(4)(+0000003): Translate: Parsing code for MAB2
(4)(+0000002): Translate: Parsing code for MARC
(4)(+0000002): Translate: Parsing code for MARCXML
(4)(+0000001): Translate: Parsing code for NCBI PubMed
(3)(+0000002): Translate: Detecting Pubmed content....
(4)(+0000000): Translate: Parsing code for RDF
(3)(+0000003): Translate: Initializing RDF data store
(2)(+0000000): Translate: Detect using RDF failed:
thrown exception => Translate: No RDF found
url => /home/edisz/Documents/Literature/citavi_db_export/ebooks_db_out2.bib
downloadAssociatedFiles => true
automaticSnapshots => true
http://forums.zotero.org/discussion/6527/
I'm no bibtex expert, but it looks like Citavi exports in a jabref-specific fashion (which explains why jabref is happy...) - that's an old thread, but apparently no one ever took care of that.
Try if
pdf = {/media/sda7/Documents/Citavi 3/Projects/Komplett_Liste/CitaviFiles/Freshwater nematodes_Abebe_2006.pdf}
imports (or maybe with quotation marks?). If it does, this shouldn't be hard to fix with a good regex search and replace.
edit: actually - that's supposed to be fixed - try nevertheless. The output you posted is not relevant, no - that's just Zotero trying out different translators until it gets to bibtex - if you get the data imported, clearly Zotero recognizes this as bibtex and imports it as such.
with pdf = { and without :PDF at the end,
with file = { and without :PDF at the end (gives me an error while importing),
with file = { and with :pdf at the end,
with pdf = { and with :pdf at the end.
And none of the worked :(
I'll see if I can replicate any of your problems later, but maybe the debug can help.
I have used this .bib - file:
@book{Nollet.2010,
author = {Nollet, Leo M. L. and Rathore, Hamir Singh},
year = {2010},
title = {Handbook of pesticides: Methods of pesticide residues analysis},
keywords = {Pesticide residues in food;Analysis;Pesticides;Agricultural chemicals;EBOOK},
address = {Boca Raton and Fla.},
publisher = {CRC Press},
isbn = {9781420082456},
file = {Handbook of Pesticides - Methods of Pesticide Residues Analysis_Nollet_CRC_2009:/media/sda7/Documents/Citavi 3/Projects/Komplett_Liste/CitaviFiles/Handbook of Pesticides - Methods of Pesticide Residues Analysis_Nollet_CRC_2009.pdf:PDF}
}
Hopefully gets fixed soon...
1. Zotero messes up the filepath - specifically the slash between media and sba7 - for your files. (that's why your import fails). I would like that confirmed and if I'm right maybe we can figure out why it does that - though for you the quickest fix might be to move all files and run a quick search&replace over your bibtex files.
2. Zotero doesn't deal correctly with directory relative paths on import (that's why it fails with files attached to its own bibtex).
With this bibtex entry:
@BOOK{Chapin.a2005,
title = {Principles of terrestrial ecosystem ecology},
publisher = {Springer},
year = {2005},
author = {apin, Francis Stuart and Matson, Pamela A. and Mooney, Harold A.
and Chapin, Melissa C.},
address = {New York and NY},
edition = {[Nachdr.]},
file = {PrinciplesOfTerrestrialEcosystemEcology_Chapin_2002:/home/edisz/PrinciplesOfTerrestrialEcosystemEcology_Chapin_2002.pdf:PDF},
isbn = {0387954392},
keywords = {Ecology;Biogeochemical cycles;Biological systems;EBOOK},
price = {alk. paper}
}
If you paste
file:///home/edisz/PrinciplesOfTerrestrialEcosystemEcology_Chapin_2002.pdf
into the URL bar of your browser, does that open the PDF?
Dan, Simon - anything you can make of the debug?
So Zotero doesnot like 'media/sda7'...
Workaround would be to copy all the file to another place and then import.
Am I a right that Zotero will copy all the files into the storage-folder? So afterwards I could delete the citavi-files [I will not move back to Citavi]?
I just made a symbolic link pointing to /media/sda7... in my home-directory and edited the bibtex-files respectively.
Thank you adam for your time and help!
I'd still be curious if Simon has any thoughts on fixing the issue with media/sda - what happens is that the filepath turns into
file:///medi℁da7/... on import and I don't know why.
this shouldn't be hard to solve.