Hi @tschaume,
I appreciate your support and guidance. I could successfully create a project (a-SiCN:H thin films) and tried to push some data to the database. I ran in to a few issues with uploading data.
- What kind of units does a column accept? I got an error with ‘Torr’ as unit for the pressure, and ‘sccm’ as an unit for flow rate.
- Can column headers can have space in between the characters? For example ’ Substrate Temperature’?
- Some of the cells in a column do not have data? How can I skip those? Should I use NaN?
- Is there any specific forum for FAQs on data contribution and writing code?
Error for the units is as follows:
‘Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/flask_mongorest/views.py”, line 189, in _dispatch_request
return super(ResourceView, self).dispatch_request(*args, **kwargs)
File “/usr/local/lib/python3.10/site-packages/flask/views.py”, line 188, in dispatch_request
return current_app.ensure_sync(meth)(**kwargs)
File “/usr/local/lib/python3.10/site-packages/flask_mongorest/views.py”, line 387, in post
self.create_object(**kwargs)
File “/usr/local/lib/python3.10/site-packages/flask_mongorest/views.py”, line 416, in create_object
self._resource.save_object(obj, force_insert=True, **kwargs)
File “/usr/local/lib/python3.10/site-packages/flask_mongorest/resources.py”, line 1129, in save_object
obj.save(signal_kwargs=signal_kwargs, **kwargs).reload()
File “/usr/local/lib/python3.10/site-packages/mongoengine/document.py”, line 407, in save
signals.pre_save_post_validation.send(
File “/usr/local/lib/python3.10/site-packages/blinker/base.py”, line 300, in send
result = receiver(sender, **kwargs) # type: ignore[call-arg]
File “/app/mpcontribs/api/contributions/document.py”, line 296, in pre_save_post_validation
document.data = remap(document.data, visit=make_quantities, enter=enter)
File “/usr/local/lib/python3.10/site-packages/boltons/iterutils.py”, line 1183, in remap
visited_item = visit(path, key, value)
File “/app/mpcontribs/api/contributions/document.py”, line 254, in make_quantities
q = get_quantity(str_value)
File “/app/mpcontribs/api/contributions/document.py”, line 98, in get_quantity
return ureg.Measurement(*parts)
File “/usr/local/lib/python3.10/site-packages/pint/measurement.py”, line 56, in new
inst = super().new(cls, mag, units)
File “/usr/local/lib/python3.10/site-packages/pint/quantity.py”, line 264, in new
units = inst._REGISTRY.parse_units(units)._units
File “/usr/local/lib/python3.10/site-packages/pint/registry.py”, line 1202, in parse_units
units = self._parse_units(input_string, as_delta, case_sensitive)
File “/usr/local/lib/python3.10/site-packages/pint/registry.py”, line 1439, in _parse_units
return super()._parse_units(input_string, as_delta, case_sensitive)
File “/usr/local/lib/python3.10/site-packages/pint/registry.py”, line 1235, in _parse_units
cname = self.get_name(name, case_sensitive=case_sensitive)
File “/usr/local/lib/python3.10/site-packages/pint/registry.py”, line 722, in get_name
raise UndefinedUnitError(name_or_alias)
pint.errors.UndefinedUnitError: ‘Torr’ is not defined in the unit registry’
Appreciate your help.
Sincerely,
Sai