slaclab / pysmurf

Other
2 stars 9 forks source link

Schema error messages are useless #651

Closed jlashner closed 3 years ago

jlashner commented 3 years ago

Describe the bug

We're getting errors at UCSD due to Schema errors from the pysmurf-config file. I realize this means there are issues in our cfg file, however the errors produced don't tell us anything about what's wrong / how to fix it, so right now it's impossible to figure out what's wrong. The errors that are produced look like this:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/schema.py", line 393, in validate
    nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value)
  File "/usr/local/lib/python3.6/dist-packages/schema.py", line 397, in validate
    raise SchemaError([message] + x.autos, [e] + x.errors)
schema.SchemaError: Key 'band_0' error:
Key 'refPhaseDelay' error:
<lambda>(22) should evaluate to True

This is pretty important because right now we are unable to initialize pysmurf and I don't know why...

Here's the cfg file we're using (you might need SO access to see it, but you can message me if you're interested): https://github.com/simonsobs/ocs-site-configs/blob/master/ucsd/k2so/smurf-srv14/pysmurf_config/experiment_ucsd_k2so_cc02-06_lbOnly_BothBays_s3.cfg

jlashner commented 3 years ago

Quick update.... we realized we were mounting in an older version of pysmurf that required refPhaseDelay to be < 16, so updating that fixed the issue.

I still think that we should figure out a way to improve schema error messages, but it's not critical to our operation.

swh76 commented 3 years ago

@jlashner we don't plan to fix this issue.