You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the command curl -H "Accept: application/json" -X POST -d@/home/zixinjiang/east-eval/tf-modified/cpb-aacip-08fb0e1f287.mmif -s http://localhost:3000?frameType=slate > tf-test-output.mmif, it should recognize the parameter frameType=slate with values "slate". However, it returns ValueError: Value for parameter "frameType" must be one of ['', 'slate', 'chyron', 'rolling-credit']
This error is caused by the line of code choices=["", "slate", "chyron", "rolling-credit"] in metadata.py
Reproduction steps
Run the app, using the command with frameType=slate, frameType=chyron, or frameType=slate&frameType=chyron
Expected behavior
No response
Log output
No response
Screenshots
Traceback (most recent call last):
File "/home/zixinjiang/east/lib64/python3.9/site-packages/clams/restify/init.py", line 146, in post
return self.json_to_response(self.cla.annotate(raw_data, **raw_params))
File "/home/zixinjiang/east/lib64/python3.9/site-packages/clams/app/init.py", line 146, in annotate
refined = self._refine_params(**runtime_params)
File "/home/zixinjiang/east/lib64/python3.9/site-packages/clams/app/init.py", line 220, in _refine_params
raise ValueError(f"Value for parameter "{parameter.name}" must be one of {parameter.choices}.")
ValueError: Value for parameter "frameType" must be one of ['', 'slate', 'chyron', 'rolling-credit'].
Additional context
This bug can be solved by deleted the line of code choices=["", "slate", "chyron", "rolling-credit"]
The text was updated successfully, but these errors were encountered:
Bug Description
When I run the command
curl -H "Accept: application/json" -X POST -d@/home/zixinjiang/east-eval/tf-modified/cpb-aacip-08fb0e1f287.mmif -s http://localhost:3000?frameType=slate > tf-test-output.mmif
, it should recognize the parameter frameType=slate with values "slate". However, it returnsValueError: Value for parameter "frameType" must be one of ['', 'slate', 'chyron', 'rolling-credit']
This error is caused by the line of code
choices=["", "slate", "chyron", "rolling-credit"]
in metadata.pyReproduction steps
Run the app, using the command with frameType=slate, frameType=chyron, or frameType=slate&frameType=chyron
Expected behavior
No response
Log output
No response
Screenshots
Traceback (most recent call last):
File "/home/zixinjiang/east/lib64/python3.9/site-packages/clams/restify/init.py", line 146, in post
return self.json_to_response(self.cla.annotate(raw_data, **raw_params))
File "/home/zixinjiang/east/lib64/python3.9/site-packages/clams/app/init.py", line 146, in annotate
refined = self._refine_params(**runtime_params)
File "/home/zixinjiang/east/lib64/python3.9/site-packages/clams/app/init.py", line 220, in _refine_params
raise ValueError(f"Value for parameter "{parameter.name}" must be one of {parameter.choices}.")
ValueError: Value for parameter "frameType" must be one of ['', 'slate', 'chyron', 'rolling-credit'].
Additional context
This bug can be solved by deleted the line of code
choices=["", "slate", "chyron", "rolling-credit"]
The text was updated successfully, but these errors were encountered: