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

Better error messages when files/directories already exist when attempting to create Genomedata archives #42

Open
EricR86 opened this issue Aug 28, 2017 · 1 comment
Labels
bug Something isn't working minor

Comments

@EricR86
Copy link
Member

EricR86 commented Aug 28, 2017

Original report (archived issue) by Eric Roberts (Bitbucket: ericr86, GitHub: ericr86).


Currently in _load_seq.py there are a lot of assertions without helpful error messages when it comes to the cases if a genomedata folder/file already exists and trying to create the opposite file/folder type.

    if mode == "dir":
        if gdpath.exists():
            assert gdpath.isdir()
        else:
            gdpath.makedirs()
    elif mode == "file":
        assert not gdpath.exists()
        gdpath.touch()  # Create file (then Genomedata archive will be a file)
@EricR86
Copy link
Member Author

EricR86 commented Aug 28, 2017

Original comment by Michael Hoffman (Bitbucket: hoffman, GitHub: michaelmhoffman).


Agree, this would be nice. Probably most of the assertions here and elsewhere should be turned into raising into proper exceptions with sensible error messages.

@EricR86 EricR86 added minor bug Something isn't working labels Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

1 participant