Closed young-hun-jo closed 2 weeks ago
• | Name | Status | URL |
---|---|---|---|
Spaces | ready! | Spaces preview | |
Website | ready! | Website preview |
Install Gradio from this PR
pip install https://gradio-builds.s3.amazonaws.com/9a4fc1b0d2d80ed578dc24406277adaa2988e44e/gradio-4.36.1-py3-none-any.whl
Install Gradio Python Client from this PR
pip install "gradio-client @ git+https://github.com/gradio-app/gradio@9a4fc1b0d2d80ed578dc24406277adaa2988e44e#subdirectory=client/python"
Install Gradio JS Client from this PR
npm install https://gradio-builds.s3.amazonaws.com/9a4fc1b0d2d80ed578dc24406277adaa2988e44e/gradio-client-1.1.1.tgz
Above test / python / linux
job is failed and I checked the details. But why the error occurs? I'm newbie in contribution and the error is just okay?
Package | Version |
---|---|
gradio |
minor |
feat: exception handling about file_count params of File component
Maintainers or the PR author can modify the PR title to modify this entry.
Hi @young-hun-jo , the issue is that the code was not up to the standard of our automatic formatter. In the future, you can fix this with bash scripts/format_backend.sh
. I pushed up a fix. This looks good to me, thanks!
Description
According to docs, Parameter
file_count
ofFile
component must be one of them(single, multiple, directory
). But I put other integer value(ex.file_count=0
) in the parameter by mistake, below error occurs.The error confused me because the message of error doesn't tell me the reason why the error occurs. So, I debugged above traceback error and followed the objects of all funcions in the stdout error. Finally, I found my mistake of putting the integer value in
file_count
parameter ofFile
component. my error code is below.Of course, according to official docs, there is a content about type of the parameter. But, if the validation logic exists in the parameter, I should have found the reason of error earlier. So, for like me, I append validation logic of the parameter in this PR
🎯 PRs Should Target Issues
According to the list of issue, I can't find the issue about this parameter of
File
component nowTests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh