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

[BUG] CSV Exporter has too many double quotes in list fields #2493

Closed
2 of 6 tasks
swheaton opened this issue Jan 6, 2023 · 2 comments · Fixed by #2497
Closed
2 of 6 tasks

[BUG] CSV Exporter has too many double quotes in list fields #2493

swheaton opened this issue Jan 6, 2023 · 2 comments · Fixed by #2497
Assignees
Labels
bug Bug fixes

Comments

@swheaton
Copy link
Contributor

swheaton commented Jan 6, 2023

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Mac OSX A1 chip
  • Python version (python --version): 3.10.8
  • FiftyOne version (fiftyone --version): develop
  • FiftyOne installed from (pip or source): source

Commands to reproduce

As thoroughly as possible, please provide the Python and/or shell commands used to encounter the issue. Application steps can be described in the next section.

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")
view = dataset.limit(2)
view.export(
  dataset_type=fo.types.CSVDataset,
  export_dir="/tmp/csv_export_test",
  fields=[
    "filepath",
    "tags",
    "ground_truth.detections.tags",
    "ground_truth.detections.label"
  ]
)

Describe the problem

CSV Exporter quotes list fields one too many times so that if read in by a CSV reader, the whole list will be surrounded by double quotes.

Above code generates this:

filepath,tags,ground_truth.detections.tags,ground_truth.detections.label
000880.jpg,"""validation""","""[],[],[]""","""bird,bird,bird"""

Vs. expected:

filepath,tags,ground_truth.detections.tags,ground_truth.detections.label
000880.jpg,"validation","[],[],[]","bird,bird,bird"

What areas of FiftyOne does this bug affect?

  • App: FiftyOne application issue
  • Core: Core Python library issue
  • Server: FiftyOne server issue

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently
  • Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community
  • No. I cannot contribute a bug fix at this time
@swheaton swheaton added the bug Bug fixes label Jan 6, 2023
@swheaton
Copy link
Contributor Author

swheaton commented Jan 6, 2023

fyi @brimoor I don't know if you experienced this too or maybe it is an OS-to-OS peculiarity.
I can fix after other items on my list are checked off.

@swheaton swheaton self-assigned this Jan 6, 2023
@brimoor
Copy link
Contributor

brimoor commented Jan 6, 2023

k I'll let you take a look when able

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants