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

dataset build not working when not proprietary of audio files #211

Closed
mathieudpnt opened this issue Oct 17, 2024 · 1 comment · Fixed by #212
Closed

dataset build not working when not proprietary of audio files #211

mathieudpnt opened this issue Oct 17, 2024 · 1 comment · Fixed by #212
Assignees
Labels
bug Something isn't working

Comments

@mathieudpnt
Copy link
Contributor

When trying to build a dataset on data_uploader notebook from audio files uploaded from someone else, i get a permission error

image

@mathieudpnt mathieudpnt added the bug Something isn't working label Oct 17, 2024
@Gautzilla
Copy link
Contributor

Seems like we are trying to change the folder permissions only to be able to write in it, without checking first if we do already have the right to write in it.

I'd use a util function to do both subsequently, e.g.

def change_permissions_if_writing_not_permitted(path: Path):
    if os.access(path, os.W_OK):
        return

    try:
        os.chmod(path, DPDEFAULT)
    except PermissionError:
        raise PermissionError(f"You do not have the permission to write to {p}, nor to change its permissions.")

I think it could do the trick

@Gautzilla Gautzilla linked a pull request Oct 18, 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
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants