Command-line upgrades have "true" as default language map key
cbutcosk opened this issue · 1 comments
cbutcosk commented
Running prezi_2_to_3.py from the command line produces funky language maps with "true" as their default language key. Running:
python2 prezi2to3.py https://iiif.museum.colby.edu/presentation/portfolio/1334.json --output /tmp/1334.json
Results in a file with labels like:
"label": {
"true": [
"A View of Albany, New York"
]
}
My workaround thus far is just to adjust this line:
if FLAGS[key]['default'] is not str:
type=bool
to
if type is not str:
type=bool
But since this is the only stringy flag I'm using, not sure what other upgrader flags that might adversely affect.
azaroth42 commented
This line makes no sense:
https://github.com/IIIF/prezi-2-to-3/blob/master/prezi2to3.py#L27