Attachment in export

Hi,
I wanted to export my librairy from computer one to computer two, but I'm unable to get attachements to be imported.
My post will probably be very long, and I'm aware there probably more than 1 issue.
Computer 1: Standalone 4.0.4, Win XP
Computer 2: Standalone 4.0.4 or Zotero 4.0.4FF20, Ubuntu 12.04 (give same result on both)

1st case :
EXPORT: rdf with file

<bib:Article rdf:about="http://doi.wiley.com/10.1111/j.1552-6569.2011.00678.x">
<z:itemType>journalArticle</z:itemType>
<dcterms:isPartOf rdf:resource="urn:issn:10512284"/>
<bib:authors>
<rdf:Seq>
<rdf:li>
<foaf:Person>
<foaf:surname>Zuccoli</foaf:surname>
<foaf:givenname>Giulio</foaf:givenname>
</foaf:Person>
</rdf:li>
<rdf:li>
<foaf:Person>
<foaf:surname>Sreedher</foaf:surname>
<foaf:givenname>Gayathri</foaf:givenname>
</foaf:Person>
</rdf:li>
</rdf:Seq>
</bib:authors>
<link:link rdf:resource="#item_4"/>
<dc:title>Reversible Cytotoxic Edema in TPN-Related Hepatic Encephalopathy</dc:title>
<bib:pages>248-250</bib:pages>
<dc:date>04/2013</dc:date>
<dc:identifier>
<dcterms:URI>
<rdf:value>http://doi.wiley.com/10.1111/j.1552-6569.2011.00678.x</rdf:value>;
</dcterms:URI>
</dc:identifier>
<dcterms:dateSubmitted>2013-04-12 15:16:18</dcterms:dateSubmitted>
<z:libraryCatalog>CrossRef</z:libraryCatalog>
</bib:Article>

RESULT: Article details are imported but there no attachment. Furthermore, entries containing only pdf are not imported (they are in the export file).

2nd case:
EXPORT: bib with file

@article{zuccoli_reversible_2013,
title = {Reversible Cytotoxic Edema in {TPN-Related} Hepatic Encephalopathy},
volume = {23},
issn = {10512284},
url = {http://doi.wiley.com/10.1111/j.1552-6569.2011.00678.x},
doi = {10.1111/j.1552-6569.2011.00678.x},
number = {2},
urldate = {2013-04-12},
journal = {Journal of Neuroimaging},
author = {Zuccoli, Giulio and Sreedher, Gayathri},
month = apr,
year = {2013},
pages = {248--250},
file = {Zuccoli & Sreedher J Neuroimaging 2012 Jan 24.pdf:files/4/Zuccoli & Sreedher J Neuroimaging 2012 Jan 24.pdf:application/pdf}
},

RESULT: Zotero complain the file is not valid. If I remove last line or add a "," it's imported. But there no link to attachment.
BUT: I could open this file in Jabref, and attachment are correctly displayed.

3rd case:
EXPORT : bib

@article{zuccoli_reversible_2013,
title = {Reversible Cytotoxic Edema in {TPN-Related} Hepatic Encephalopathy},
volume = {23},
issn = {10512284},
url = {http://doi.wiley.com/10.1111/j.1552-6569.2011.00678.x},
doi = {10.1111/j.1552-6569.2011.00678.x},
number = {2},
urldate = {2013-04-12},
journal = {Journal of Neuroimaging},
author = {Zuccoli, Giulio and Sreedher, Gayathri},
month = apr,
year = {2013},
pages = {248--250},
file = {Zuccoli & Sreedher J Neuroimaging 2012 Jan 24.pdf:C:\Data\melanie\Logiciels\Zotero\data\storage\BHKRN4QF\Zuccoli & Sreedher J Neuroimaging 2012 Jan 24.pdf:application/pdf}
},

RESULT: correctly imported, but still, no link to attachment.

Conclusion: Zotero seems to be unable to grab attachment, whatever on which format is from. Note that when I say there no attachment, I mean there no child attachment as on origin database, not that the file is missing because of a path's problem.

Unfortunately, I didn't save any other formats (it's from my work's computer, I will not have it until next monday).
Hope it was clear, I could also give the file if needed.
Mel

PS Not related, but on bib export with "journal abreviation", if there no journal abreviation, it import any information about journal. It should, if no abrev present, export long name of journal.
  • The first RDF doesn't have any file links - it's likely incomplete and it may just be missing the relevant part, but that wouldn't import a file.

    The first bibtex should though - did you copy the entire folder it was in? The would have been a folder named "Exported Items" (by default, you could have renamed it), with the bibtex file and a folder called "files" - was that there?

    The third option wouldn't work - as you can see it has the file link to your directory on Windows.
  • RDF: it's not this? <link:link rdf:resource="#item_4"/>

    This attachment (alone) are also not imported:
    <z:Attachment rdf:about="#item_1150">
    <z:itemType>attachment</z:itemType>
    <dc:title>Das et al Dig Dis Sci. 2008 Oct;53(10).pdf</dc:title>
    <link:type>application/pdf</link:type>
    </z:Attachment>


    Bib: Yes, I have a folder "files", which I copy in "storage" in profile. But anyway, this file cannot be read by Zotero.
    Sorry it's in french :
    Une erreur s'est produite lors de la tentative d'importation du fichier sélectionné. Veuillez vérifier que le fichier est valide et réessayez.
  • edited April 13, 2013

    Bib: Yes, I have a folder "files", which I copy in "storage" in profile.
    That sounds like it's the cause of the problem.
    So let me break this down: When you export from Zotero with files this is how the export looks like

    Exported Items
    |
    |----Exported Items.RDF*
    |
    |----files
    |
    |--1
    |-----attachment1.pdf*
    |
    |--2
    |-----attachment2.pdf*

    ...

    Where * denotes files and file and folder names can differe except for the "files" folder.

    If you want to export items with files from one computer to the other, you need to copy the entire "Exported Items" folder.
    Then, on the target computer, you need to import the "Exported Items.RDF" file from Zotero while it still is in that folder. To restate that: It is crucial that the file you import is in the same directory as the "files" folder when you do the import. Only that way will files import. It sounds from your description that wasn't the case. This will currently break the bibtex import as you saw in your second case - it breaks when it looks for a non-existent file under a valid filepath.
  • Ok, I re-did as you said, it kinds of working. It imports correctly ~20 items and stops.

    I try to understand how files linked works. I set up a folder for relative links (C:\lab), but when I export in .bib I get instead get a
    C:\Data\Zotero\data\storage\HCUIU7GN\

    How do I transfer a folder of pdf and entries to my other computer? (I don't want to use sync for this purpose)
  • If you want to transfer a folder of PDFs to another computer follow this:
    If you want to export items with files from one computer to the other, you need to copy the entire "Exported Items" folder.
    Then, on the target computer, you need to import the "Exported Items.RDF" file from Zotero while it still is in that folder.
    If that's not working, provide more details. As a rule of thumb, your posts should be longer than mine.

    Relative links only apply to links, not to files stored in Zotero.
  • I´m having the same problem

    "Ok, I re-did as you said, it kinds of working. It imports correctly ~20 items and stops."

    I´m working in a Win7PRO 64bits
  • Are you using Zotero with Firefox or Zotero Standalone? What version?

    what do you mean by "stops"? Are you also importing an RDF file? Can you replicate this issue with only a few items in your exported file? if so, can you post the file on gist.github.com and provide a link?
  • edited April 20, 2013
    Hi Aurimas,
    An important issue: When I try to import my citations (~200 citations) with NO attached PDF, the import works fine (no problem at all).

    About your questions:
    "Are you using Zotero with Firefox or Zotero Standalone? What version?"
    I tested in both versions: Firefox and Zotero Standalone. Latest versions (Zotero: 4.0.5, Firefox 20.0.1). Same result (It imports correctly ~20 items and stops).

    "What do you mean by "stops"?
    Zotero began to import citations and stops with this message: "An error occurred while trying to import the selected file. Please ensure that the file is valid and try again". I clicked "Continue" and a few citations were imported (the first ~20 citations of ~200 citations).
    I tried with both formats (I was working on Mendeley): .ris and .bib formats. Same result: It imports correctly ~20 items and stops; even after I corrected the bibtex export bug in Mendeley

    "Are you also importing an RDF file?"
    No.

    "Can you replicate this issue with only a few items in your exported file?"
    Yes. I tried with only 20 citations, and Zotero only imports ~10 citations.

    "if so, can you post the file on gist.github.com and provide a link?"
    Yes, this is the link for the 20 citations version:
    https://gist.github.com/anonymous/5425873

    It looks like a cache problem; in about:config there are a lot of cache options, but I prefer to do not change anything...
    Thanks for all your help! Best,
    max
  • It looks like a cache problem; in about:config there are a lot of cache options, but I prefer to do not change anything...
    I'm not sure what you're referring to here and why you arrived at that conclusion.

    This appears to be fixed in Zotero 4.0.6, which will be out soon.
  • "I'm not sure what you're referring to here and why you arrived at that conclusion."

    It was just an idea. That´s why I didn´t change anything...

    "This appears to be fixed in Zotero 4.0.6, which will be out soon."
    Great news! I will inform here if the import function works fine in the future version.

    Best,
    max
  • So I just figured out what was happening (should have figured it out much sooner...). The PDF attachments you are trying to import have very long file names. This, in addition with your Zotero data directory being somewhere deep within your file system (e.g. C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\.default\zotero), results in file paths are are beyond what Windows can handle (259 characters)

    You have several options, but the easiest would be to wait for Zotero 4.0.6 to come out, which automatically shortens file names on import.
  • Any data considered for Zotero 4.0.6 release?
  • 4.0.6 came out last night, if that's what you're asking.
  • 4.0.6 is out as of last night.
  • Glad to see someone confirm and furthermore helps to resolve. I will have more time this week to re-try importing within this new version.
    Thanks!
  • I tested the new version. It´s working great!!!

    Thanks, nice job; Coming back to Zotero....!!!
Sign In or Register to comment.