Errors using the Import/Export CSV Plugin

Nice, thanks!

This turned out to be a subtlety. In your CSV file header (or your template) you’ve used the property tropy#photo. This is a problem, because that’s the property Tropy uses to identify photo objects of items. So when Tropy processes your data it will see these metadata values and assume they are photo objects. Subsequently the import fails because Tropy can’t figure out what file these photos correspond to (since they’re just values like ‘NO’).

Yes that was it! It seems to we working like a charm now! Thanks for all your work figuring this out - I don’t think I would have managed to work it out

Hola!
Tengo un problema con la exportación de CSV.
Podrían ayudarme?
Hi!
I have a problem with CSV exportation.
Can you help me?

The program showme the next message:

{“msg”:“Falla en la exportación de objetos.”,“stack”:“TypeError: Cannot read properties of undefined (reading ‘export’)\n at Plugins.exec (/Applications/Tropy.app/Contents/Resources/app.asar/lib/bootstrap-ce39e4e2.js:6648:30)\n at export (/Applications/Tropy.app/Contents/Resources/app.asar/lib/bootstrap-ce39e4e2.js:6651:17)\n at runCallEffect (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:5372:21)\n at runEffect (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:6046:7)\n at digestEffect (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:6113:5)\n at next (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:6003:9)\n at currCb (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:6093:7)\n at runSelectEffect (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:5579:5)\n at runEffect (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:6046:7)\n at digestEffect (/Applications/Tropy.app/Contents/Resources/app.asar/lib/project-58f970d2.js:6113:5)”,“system”:“Darwin 19.6.0 (x64)”,“time”:1687760528705,“version”:“1.14.0”}

Hi!

It looks like you probably downloaded the plugin’s source code instead of the latest release file. Please try to uninstall the CSV plugin and download and install the latest release instead. On the release page you need to download the zip file called tropy-plugin-csv-v3.2.0.zip, not the zip filed labeled ‘Source Code’:

Apologies that this is confusing! Unfortunately we can’t remove the source code link from the release page.

Thaks.
Now, I will to work

Hello! Please excuse me if this question has already been asked (possibly in your reply from March 10th?). I was wondering if you could help me with a CSV export issue. I downloaded the new version of the CSV export plugin from Github. When I export a selection of items, the file downloads without a specific file type (the “Type” is merely listed as “File”). The trouble is in opening this file with excel. I have been seeing the following error message.


If I click “yes” to open the file anyway, Excel opens but all information appears in the first column. As an example, here are the contents of row 2 from the spreadsheet (with light edits to the file path, etc).

IMG_7198,“M, Nathaniel V.”,“”,“”,“”,“Fragment”,“CNDR”,“Department of Commerce”,“Nov. 27-017”,“Lansdell K. C, 1957”,“”,“”,“Education”,“C:\Users\sarah\OneDrive\Documents.…\IMG_7198.JPG”,“IMG_7198”,“1657727142000”,“”

I tried following the instructions on some excel forums about what to do when CSV files open with data in a single column in Excel but was unable to resolve the issue. Should I do something different on the Tropy side? Thank you in advance for any help!

You can set the default filename using the file picker in the plugin settings. If there’s no default name, you should be presented with a file picker for each export. Either way, the file name is the one you pick. It varies by operating system, but you should definitely be able to add the ‘.csv’ extension to the name if it isn’t appended automatically.

You can also rename the file you’ve already exported. Just add the extension .csv and that will hopefully help Excel to interpret the data in better way.

Thank you for your quick reply! The second option fixed it.

Hello,

I’m trying to understand how .csv import works. When I export and re-import a file without opening it everything is fine. But when I edit it in LibreOffice Calc and save it in .csv, the import no longer works. I compared my two files (the one from Tropy export and the one from Calc) and the only difference is the use of double quotes for empty cells in the Tropy export. Is it mandatory ?

Thank you in adavance for any help,

Aurélien

Error :
{“msg”:“Invalid Closing Quote: got "," at line 1 instead of delimiter, record delimiter, trimable character (if activated) or comment”,“stack”:“Error: Invalid Closing Quote: got "," at line 1 instead of delimiter, record delimiter, trimable character (if activated) or comment\n at Object.parse (C:\Users\bius\AppData\Roaming\Tropy\plugins\tropy-plugin-csv-v3.2.0\index.js:1313:19)\n at parse$1 (C:\Users\bius\AppData\Roaming\Tropy\plugins\tropy-plugin-csv-v3.2.0\index.js:1851:23)\n at CSVPlugin.import (C:\Users\bius\AppData\Roaming\Tropy\plugins\tropy-plugin-csv-v3.2.0\index.js:2215:25)”,“system”:“Windows_NT 10.0.19045 (x64)”,“time”:1705074772144,“version”:“1.15.2”}

Whether or not blank values are wrapped in quotes on export depends on your plugin configuration (if ‘wrap all values in quotes’ is enabled). But I believe it doesn’t make a difference on import. That said, judging by the error message there’s definitely some issue with the quotes – my first guess would be that you maybe have quotes in your actual values and that they are not properly escaped. Could you post the full line (or file) that can’t be imported? That should make it easier to point out the issue at hand.

Hi,

I am getting a similar error message, but I am not sure what you meant by consolidating items. What did you do to fix the issue?

Hi jwipeg,
Inukshuk can probaably give you a better answer than I can, but this is how it worked for me.
I put personal letters into Tropy. Some were one image and some were multiple images.

On the CSV spreadsheet, the letters with two images had repeated sets of columns (trailing columns) for the two image letters. If you export two or three of your items, at least one with one image and one with two images, then look at the CSV export as a spreadsheet, I think you will see what I mean.

In order for the import to work for me, I needed to make every item one image. Then go thru and “consolidate” the multiple image items after the import. The instructions for how to Consolidate Your Photo Library are in the Help document. I think that you just have to run the process one time after your import because the first several columns are identical and Tropy knows that they should be together.

Hope this helps!