open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 27 forks source link

Error in reaction landing page generation #597

Closed skearnes closed 3 years ago

skearnes commented 3 years ago

@connorcoley This really shouldn't cause a 500...

web_1           | ERROR:ord_interface.search:Exception on /id/ord-022ceb28e07e44f49003f014d22056b7 [GET]
web_1           | Traceback (most recent call last):
web_1           |   File "/opt/conda/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
web_1           |     response = self.full_dispatch_request()
web_1           |   File "/opt/conda/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
web_1           |     rv = self.handle_user_exception(e)
web_1           |   File "/opt/conda/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
web_1           |     reraise(exc_type, exc_value, tb)
web_1           |   File "/opt/conda/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
web_1           |     raise value
web_1           |   File "/opt/conda/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
web_1           |     rv = self.dispatch_request()
web_1           |   File "/opt/conda/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
web_1           |     return self.view_functions[rule.endpoint](**req.view_args)
web_1           |   File "/usr/src/app/ord-interface/ord_interface/search.py", line 87, in show_id
web_1           |     return generate_text.generate_summary(dataset.reactions[0])
web_1           |   File "/opt/conda/lib/python3.7/site-packages/ord_schema-0.0.0-py3.7.egg/ord_schema/visualization/generate_text.py", line 97, in generate_summary
web_1           |     bond_length=bond_length)
web_1           |   File "/opt/conda/lib/python3.7/site-packages/ord_schema-0.0.0-py3.7.egg/ord_schema/visualization/generate_text.py", line 43, in _generate
web_1           |     text = template.render(reaction=reaction, **kwargs)
web_1           |   File "/opt/conda/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
web_1           |     self.environment.handle_exception()
web_1           |   File "/opt/conda/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
web_1           |     reraise(*rewrite_traceback_stack(source=source))
web_1           |   File "/opt/conda/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
web_1           |     raise value.with_traceback(tb)
web_1           |   File "<template>", line 811, in top-level template code
web_1           |   File "/opt/conda/lib/python3.7/site-packages/ord_schema-0.0.0-py3.7.egg/ord_schema/units.py", line 232, in format_message
web_1           |     if message.units == getattr(type(message)(), 'UNSPECIFIED'):
web_1           | AttributeError: units
skearnes commented 3 years ago

Duplicate of https://github.com/open-reaction-database/ord-interface/issues/23