RIS export failing
Using Zotero: 5.0.88, Windows.
When exporting a collection as a RIS file with files and notes this fails consistently when exporting it more than once. It works always the first time around but then fails when exporting it again.
My collection has 153 items, some are large (4 Mb) PDF books. All up a 320 MB collection of files.
It says "An error occurred while trying to export the selected file."
But when exporting it again, into a fresh new folder, it fails each time.
The workaround is to make a new collection in Zotero, copy all the items from the old collection into the new collection and then export as RIS again.
So somehow exporting a collection once as RIS makes it impossible to export it again another time.
It gets through about 75% of the items and files on the consecutive export and then fails.
When exporting a collection as a RIS file with files and notes this fails consistently when exporting it more than once. It works always the first time around but then fails when exporting it again.
My collection has 153 items, some are large (4 Mb) PDF books. All up a 320 MB collection of files.
It says "An error occurred while trying to export the selected file."
But when exporting it again, into a fresh new folder, it fails each time.
The workaround is to make a new collection in Zotero, copy all the items from the old collection into the new collection and then export as RIS again.
So somehow exporting a collection once as RIS makes it impossible to export it again another time.
It gets through about 75% of the items and files on the consecutive export and then fails.
However, my work around now seems not to be working either. So this is again a shot at RIS export that failed pretty early in the process
Today, after adding some more items to a collection and adding some notes etc I reported again and the error happened.
I then made a new collection, added the old collection into the new collection and could export as RIS fine.
This worked repeatedly as a workaround.
But now, as you asked me to produce another good is export, it no longer works either. It now seems that I cannot export the collection as RIS at this time.
ID, unsuccessful, just now: 1718441351
So to recap: My workaround is to make a new collection, copy the items to the new collection. Then export that new collection. That works, IF Debug is not enabled...
ID: D834057012
This time my RIS export works again and again, with DEBUG enabled and without doing my workaround. I did not need to copy the items to a new folder this time.
Bizarre indeed...
Assuming this is a on a regular disk (not some sort of server-mirrored drive), my best guess is that security software on your system is somehow interfering.
When I use names such as: "TEST RIS 8" (10 characters) it works.
When I use longer names such as: "STEM and CCE RIS 8" (18 characters) it fails.
Just an idea. I just tried this and consistently it works with short names and fails with long names. So you have a directory file name length overrun, or, due to some file names in the PDFs being long in my collection, there is a path overrun issue at 256 bytes or something that in my case gets triggered with a longer folder name start?
Anyway that's where you need to look for the issue.
I have over 30 years in writing software and started dreaming in Hex writing a massive app for the original MAC qube in 1984... ;-)
So you have a 10 character limit issue that you need to look for in your code. Unless, and that's a possibility, it is connected to a long PDF file. But I know in a second by exporting a collection that has only short file names inside.
Suggestion: When making PDF names in Zotero from the meta data sort something out that limits the file name to a reasonable length!
So better to limit the PDF file name lengths...
Can I do a show file in folder, and then manually rename the file there in Windows without breaking the link?
What a pain with some 159 files in that collection to make it more stable to use.
So clearly, in your rename files from Metadata you have an issue with this. Some thinking there needed. You would want unique names if possible if somebody wants to collect all the files in into some other folder outside the Zotero structure perhaps which are not too long.
Also, I normally anyway save all my PDFs in an outside folder and just link to these from Zotero. But for this project I was under time pressure and I allowed Zotero to save the files into its own folder structure with initially the original names from the journal download such as "Full Tex.pdf" which is of course not useful to hand to somebody else.
Thats why I used the "name file from Metadata" feature, which got my extensive collection now into a precarious state...
So if you update your next Zotero please have a look at that issue. It could really nail it for some people badly.
Best!
Thomas
So in fact, the long file name issue is not arising at the point of doing a ""rename file from parent metadata" but is happening at the point when a file is entered by Zotero into its structure. At that point the actual file name Zotero then chooses is a combo of the author, year, and title and possibly very long. That is hidden from the view because you only see "Full Text" as the PDF file name in the Zotero view in UI in Zotero.
But then later with a RIS export, in particular if it is deeper in my folder structure, bang...
So the registry entry change will the solution for me.
Enable Win32 long paths = 1
But the behaviour did not change in Zotero. The same bug happens when my directory path is too long. So is Zotero not Long Path aware itself?