Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure in using frameType parameter #11

Open
1192119703jzx opened this issue Aug 26, 2024 · 2 comments · May be fixed by #12
Open

Failure in using frameType parameter #11

1192119703jzx opened this issue Aug 26, 2024 · 2 comments · May be fixed by #12
Labels
🐛B Something isn't working

Comments

@1192119703jzx
Copy link

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 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"]

@1192119703jzx 1192119703jzx added the 🐛B Something isn't working label Aug 26, 2024
@clams-bot clams-bot added this to apps Aug 26, 2024
@github-project-automation github-project-automation bot moved this to Todo in apps Aug 26, 2024
1192119703jzx added a commit that referenced this issue Aug 26, 2024
@1192119703jzx 1192119703jzx linked a pull request Aug 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛B Something isn't working
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

4 participants
@1192119703jzx and others