Errors when importing from CiteULike

I am trying to import ~1500 citations from CiteULike in BibTex format with attachments. I can get several to import just fine and the attachments are there but then I get the error " An error occurred while trying to import the selected file. Please ensure that the file is valid and try again". The files are all in the correct place so I'm not sure why I keep getting the error. The error Report ID is 1993824122. Here is an example of a record that is giving me the error:

@article{citeulike:13293927,
author = {O'Connor, Christopher D. and Falk, Donald A. and Lynch, Ann M. and Swetnam, Thomas W.},
citeulike-article-id = {13293927},
citeulike-attachment-1 = {OConnoretal2014firepinalenos.pdf; /pdf/group/6013/article/13293927/976811/OConnoretal2014firepinalenos.pdf; 3de52614fb3c5ae131984c20765f09bb18269f88},
citeulike-linkout-0 = {http://dx.doi.org/10.1016/j.foreco.2014.06.032},
doi = {10.1016/j.foreco.2014.06.032},
pdf = {R:\CiteuLike\OConnoretal2014firepinalenos.pdf},
issn = {03781127},
journal = {Forest Ecology and Management},
keywords = {climate-change-impacts, drought, wildfire},
month = oct,
pages = {264--278},
posted-at = {2014-07-22 17:21:51},
priority = {2},
title = {Fire severity, size, and climate associations diverge from historical precedent along an ecological gradient in the Pinale\~{n}o Mountains, Arizona, USA},
url = {http://dx.doi.org/10.1016/j.foreco.2014.06.032},
volume = {329},
year = {2014}
}


And here is one that is importing just fine:
@proceedings{citeulike:13760538,
abstract = {We know more about vegetation change on the Santa Rita Experimental Range since
1903 than is known about any other 20,000-ha area in the world. This record is only possible
because important techniques of measuring vegetation changes were developed on the Santa Rita,
such as repeat photography and the line intercept transect method, and because they were applied
often and broadly. A 100-year record of experiments and systematic observations nourishes the
interpretation of these changes. Together, they describe a steady increase of mesquite trees, four
cycles of burroweed eruption and decline, one cholla cactus cycle, interannual and interdecadal
variation in native grass composition, and the recent dominance of the nonnative Lehmann
lovegrass. The most conspicuous change is the increase of mesquite, which began before 1903
when the spread of seed by livestock and cessation of fire led to the establishment of mesquite in
the open grasslands. The growth of these plants and subsequent recruits transformed the
grasslands into a mesquite-grass savanna, and neither the elimination of livestock grazing nor the
occasional fire has reversed this change. Burroweed cycles appear to be more closely related to
winter precipitation patterns and maximum plant longevity than land management activities.
Similarly, the increase of Lehmann lovegrass is largely independent of livestock grazing management},
author = {McClaran, M. P.},
booktitle = {Santa Rita Experimental Range: 100 years (1903 to 2003) of accomplishments and contributions},
citeulike-article-id = {13760538},
citeulike-attachment-1 = {mcclaranetal2003santaritaexprange100yrsaccomplishments.pdf; /pdf/group/6013/article/13760538/1033996/mcclaranetal2003santaritaexprange100yrsaccomplishments.pdf; 62af9124f71c44c030a176d872df614e3d484c6c},
day = {30},
editor = {McClaran, Mitchel P. and Ffolliott, Peter F. and Edminster, Carleton B.},
pdf = {R:\CiteuLike\mcclaranetal2003santaritaexprange100yrsaccomplishments.pdf},
keywords = {grassland, grazing, mesquite, srer},
location = {Tucson, AZ},
month = oct,
organization = {U.S. Department of Agriculture, Forest Service, Rocky Mountain Research Station},
pages = {1--18},
posted-at = {2015-09-09 21:01:54},
priority = {2},
title = {A century of vegetation change on the Santa Rita Experimental Range},
volume = {RMRS-P-30},
year = {2003}
}


For all the records that won't import, I am able to copy them and import from clipboard and drag and drop the attachment to that record. Any idea why these particular records won't import like all the other records? Every time it hits one of these it stops the import and won't import anything after that record.
  • I'm guessing it's the filepath format for the pdfs (and there likely something specific to a backslash/letter combination -- do they import when you delete that line?
  • They do import when I remove the pdf line but others that import fine also have the same pdf line. For instance, the record with this pdf line imports just fine: pdf = {R:\CiteuLike\mccabeetal2008.pdf}. But the record with this pdf line: pdf = {R:\CiteuLike\Overlandetal2008.pdf} and this pdf line: pdf = {R:\CiteuLike\inf_38_electrocution_review.pdf} fail to import. I have thousands of records that I would like to import from CiteULike and ProCite and I need them to keep their attachments so I can't just remove the pdf line from all of them. But I can't figure out what the difference is between the ones that import fine and the ones that give the error.
  • you don't have RIS available as a file format, do you? That would work more smoothly.

    Windows filepaths and Bibtex are always a bit of a mess because of the special nature of the backslash in bibtex. I think we should be able to improve this, but since bibtex was never intended as a data transfer format, there's no standard way of displaying (and thus reading) them. My guess would be that the reason some are failing and some aren't is connected to the letter following the \ and what bibtex turns that into.
  • I haven't taken a look at this in a while and don't have a Windows machine handy. But, a few observations.
    • I don't think that Zotero should do any processing on the pdf field. We don't seem to for doi/url/file/lccn fields, so perhaps we should protect this one too?

    • If the diagnosis is correct, there are likely work-arounds with the current translator. One of these may work:
      • Find/replace "pdf =" with "file ="
      • Find/replace "R:\CiteuLike\" with "R:/CiteuLike/"
    I haven't tested the latter recently, but I think Firefox doesn't care how slashes are oriented on Windows filesystems. Escaping the backslash (e.g. R:\\CiteuLike\\) may work better. You can check by copy/pasting the file link into your firefox addressbar.
  • Changing the backslashes to forward slashes worked! Those files appear to be importing fine now. Changing "pdf =" to "file =" allowed the import but it didn't include the attachment. The RIS file exported out of CiteULike didn't include the attachment name so I couldn't use that.

    It's working now though so thanks for your help! You guys are awesome!
Sign In or Register to comment.