Internal Server Error (500) on bs + dos search in encyclopedia API
Example request:
{search_by: {exclusive: "0", page: 1, per_page: 10}, has_band_structure: true, has_dos: true}
Traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.7/site-packages/flask_restplus/api.py", line 325, in wrapper
resp = resource(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/views.py", line 89, in view
return self.dispatch_request(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask_restplus/resource.py", line 44, in dispatch_request
resp = meth(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask_restplus/marshalling.py", line 243, in wrapper
resp = f(*args, **kwargs)
File "/app/nomad/app/api/auth.py", line 158, in wrapper
return func(*args, **kwargs)
File "/app/nomad/app/api/encyclopedia.py", line 334, in post
s = s.query(bool_query)
UnboundLocalError: local variable 's' referenced before assignment
Btw. Does this even work properly and would also include materials where BS and DOS come only from different calculations? I guess this is where we would really need an aggregated dedicated index, right?