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

"panoptes_aggregation config" incorrectly parsing apostrophes in task labels #644

Open
mikejcorey opened this issue Nov 1, 2022 · 3 comments

Comments

@mikejcorey
Copy link

When I run panoptes_aggregation config on my workflow export file, the Task_labels_workflow_[blah].yaml file is being generated with incorrectly parsed apostrophes in task labels.

For example:

"T0.answers.3.label":"I can't figure this out. " in the "strings" field in my workflows CSV is being rendered in the Task_labels_workflow_[blah].yaml as T0.answers.3.label: 'I can''t figure this out. '

@CKrawczyk
Copy link
Collaborator

I think this is a consequence of using yaml.dump to create the YAML file. After looking into it, the double apostrophe is the YAML standard of single quotes inside a string.

@mikejcorey
Copy link
Author

Can you point me to a doc on that? I couldn't find anything yesterday. I am using Python's yaml library and yaml.full_load is not correctly parsing that, if that's the case. (I know that this part is not your job, but if you remember what you found that would be really helpful.)

@CKrawczyk
Copy link
Collaborator

I was going off this page I found today (not sure how accurate it is): https://docs.octoprint.org/en/master/configuration/yaml.html

For reference, the line that writes the file is here: https://github.com/zooniverse/aggregation-for-caesar/blob/master/panoptes_aggregation/scripts/config_workflow_panoptes.py#L125

Odd that the built-in YAML package can read in a file that it writes. I will try to do a bit of testing to see if this is a bug on my end or a bug in YAML's end.

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

No branches or pull requests

2 participants