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

Error while specifying only ratio and image folder with CLI #19

Closed
ashnair1 opened this issue Oct 11, 2020 · 1 comment
Closed

Error while specifying only ratio and image folder with CLI #19

ashnair1 opened this issue Oct 11, 2020 · 1 comment

Comments

@ashnair1
Copy link

splitfolders --ratio .8 .2 img_folder throws the following error

usage: splitfolders [-h] [--output OUTPUT] [--seed SEED]
                    [--ratio RATIO [RATIO ...]] [--fixed FIXED [FIXED ...]]
                    [--oversample] [--group_prefix GROUP_PREFIX]
                    input
splitfolders: error: argument --ratio: invalid float value: 'img_folder'

@ashnair1 ashnair1 changed the title Error while specifying only ratio and image folder Error while specifying only ratio and image folder with CLI Oct 11, 2020
@jfilter
Copy link
Owner

jfilter commented Oct 15, 2020

Thanks for reporting. This looks like a bug (or at least a very rough edge) of Python's argparse. https://stackoverflow.com/a/26986546/4028896

Please use it like this:

splitfolders --ratio .8 .2 -- img_folder

I will update the docs.

@jfilter jfilter closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants