DataONEorg / slinky

Slinky, the DataONE Graph Store
Apache License 2.0
4 stars 4 forks source link

Fix bug in ORCID processing code #37

Closed amoeba closed 3 years ago

amoeba commented 3 years ago

Saw this while testing earlier today

; slinky get doi:10.18739/A23F4KP3J
Traceback (most recent call last):
  File "/usr/local/bin/slinky", line 33, in <module>
    sys.exit(load_entry_point('d1lod', 'console_scripts', 'slinky')())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/bryce/src/slinky/d1lod/d1lod/cli.py", line 35, in get
    model = client.get_model_for_dataset(id)
  File "/Users/bryce/src/slinky/d1lod/d1lod/client.py", line 77, in get_model_for_dataset
    return processor.process()
  File "/Users/bryce/src/slinky/d1lod/d1lod/processors/eml/eml220_processor.py", line 87, in process
    return super().process()
  File "/Users/bryce/src/slinky/d1lod/d1lod/processors/eml/eml_processor.py", line 70, in process
    self.process_publisher()
  File "/Users/bryce/src/slinky/d1lod/d1lod/processors/eml/eml_processor.py", line 214, in process_publisher
    publisher_subject = self.process_party(publisher)
  File "/Users/bryce/src/slinky/d1lod/d1lod/processors/eml/eml_processor.py", line 129, in process_party
    return self.process_organization(party)
  File "/Users/bryce/src/slinky/d1lod/d1lod/processors/eml/eml_processor.py", line 381, in process_organization
    self.process_user_id(party_subject, user_id)
  File "/Users/bryce/src/slinky/d1lod/d1lod/processors/eml/eml_processor.py", line 228, in process_user_id
    self.process_user_id_as_generic(party_subject, user_id)
  File "/Users/bryce/src/slinky/d1lod/d1lod/processors/eml/eml_processor.py", line 326, in process_user_id_as_generic
    directory = user_id.attrib["directory"]
AttributeError: 'str' object has no attribute 'attrib'
amoeba commented 3 years ago

Fixed by 10e6b122877fa3ad7669ff0ffd8dee3b5c3139e3.