Skip to content

Conversion files when no media given in Elan file #21

@Glottotopia

Description

@Glottotopia

File "/home/snordhoff/workspace/virtualenvironments/poio/local/lib/python2.7/site-packages/poioapi/io/graf.py", line 334, in parse self.primary_data = self.parser.get_primary_data() File "/home/snordhoff/workspace/virtualenvironments/poio/local/lib/python2.7/site-packages/poioapi/io/elan.py", line 292, in get_primary_data primary_data.type = poioapi.io.graf.UNKNOWN AttributeError: 'module' object has no attribute 'UNKNOWN'

when setting primary_data.type = poioapi.io.graf.VIDEO in line 292 for debugging purposes,

File "/home/snordhoff/workspace/virtualenvironments/poio/local/lib/python2.7/site-packages/poioapi/io/graf.py", line 555, in _add_primary_data self.standoffheader.datadesc.primaryData = {'loc': loc, UnboundLocalError: local variable 'loc' referenced before assignment

suggestions:

  • define type UNKNOWN
  • initialize loc with '' before the if-statements starting in line 548
  • (even better: implement error handling with useful error messages)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions