mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
bug fix (return ValueError → raise ValueError) (#2445)
* bug fix (return ValueError → raise ValueError) * changelog Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
89fc21b17d
commit
72c2ace2b8
@ -28,6 +28,8 @@ No changes to highlight.
|
||||
* Automatically restart spaces if they're down by [@aliabd](https://github.com/aliabd) in [PR 2405](https://github.com/gradio-app/gradio/pull/2405)
|
||||
* Carousel component is now deprecated by [@abidlabs](https://github.com/abidlabs) in [PR 2434](https://github.com/gradio-app/gradio/pull/2434)
|
||||
* Build Gradio from source in ui tests by by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2440](https://github.com/gradio-app/gradio/pull/2440)
|
||||
* Change "return ValueError" to "raise ValueError" by [@vzakharov](https://github.com/vzakharov) in [PR 2445](https://github.com/gradio-app/gradio/pull/2445)
|
||||
|
||||
|
||||
## Contributors Shoutout:
|
||||
No changes to highlight.
|
||||
|
@ -359,7 +359,7 @@ def convert_component_dict_to_list(outputs_ids: List[int], predictions: Dict) ->
|
||||
reordered_predictions = [skip() for _ in outputs_ids]
|
||||
for component, value in predictions.items():
|
||||
if component._id not in outputs_ids:
|
||||
return ValueError(
|
||||
raise ValueError(
|
||||
f"Returned component {component} not specified as output of function."
|
||||
)
|
||||
output_index = outputs_ids.index(component._id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user