Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle BOM and other issues found in forum issue #25

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

caro401
Copy link
Collaborator

@caro401 caro401 commented Dec 19, 2023

Forum post: https://forums.tropy.org/t/import-metadata-from-csv/2784/5

Things that were broken

  • plugin didn't handle files with BOM at all. This is just an option in the CSV parsing library I'd forgotten to add
  • plugin broke when there was a missing value in a TROPY/#path column (corresponding to a missing photo filename) because it couldn't get the file extension of undefined. This is fixed by checking the path is defined when trying to construct a photo
  • plugin broke when some columns were empty, fixed by returning an empty object in these cases, rather than undefined (Plugin fails when first column of row contains no data #23)

I'm sure there's better ways to handle at least the last 2 issues, but this was the best I could think of now.

@caro401 caro401 linked an issue Dec 19, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin fails when CSV has BOM
1 participant