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

Bug: Importer for AttHack, permission error when non-privileged user #2215

Open
wasertech opened this issue May 17, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@wasertech
Copy link
Collaborator

wasertech commented May 17, 2022

This is a well known bug for this importer.
When you try to use import_atthack.py as non-root, the archives try to restore the files where they were originaly packed at /Volumes/CLEM_HDD/IRCAM/Open_SLR/.
I suspect tar is confused here because it has to extract a file named /Volumes inside the target_dir.

+ python /home/trainer/stt/bin/import_atthack.py --validate_label_locale /home/trainer/fr/validate_label.py --save_excluded_max_sec_to_disk /mnt/extracted/data/Att-HACK/Att-HACK_excluded_lm.txt /mnt/extracted/data/Att-HACK/
Using FFMPEG from /usr/bin/ffmpeg.
2022-05-17 11:41:52.544213: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.
Found archive "/mnt/extracted/data/Att-HACK/txt.tgz" - not downloading.
Found archive "/mnt/extracted/data/Att-HACK/wav.tgz" - not downloading.
No directory "/mnt/extracted/data/Att-HACK/Volumes/CLEM_HDD/IRCAM/Open_SLR/txt" - extracting archive...
Traceback (most recent call last):
  File "/home/trainer/stt/bin/import_atthack.py", line 87, in _maybe_extract
    raise FileNotFoundError
FileNotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/trainer/stt/bin/import_atthack.py", line 385, in <module>
    _download_and_preprocess_data(target_dir=CLI_ARGS.target_dir)
  File "/home/trainer/stt/bin/import_atthack.py", line 64, in _download_and_preprocess_data
    _maybe_extract(
  File "/home/trainer/stt/bin/import_atthack.py", line 91, in _maybe_extract
    tar.extractall(target_dir)
  File "/usr/lib/python3.8/tarfile.py", line 2028, in extractall
    self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
  File "/usr/lib/python3.8/tarfile.py", line 2069, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
  File "/usr/lib/python3.8/tarfile.py", line 2133, in _extract_member
    os.makedirs(upperdirs)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 1 more time]
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/Volumes'

Since this only happens when importing as non-root, you can just pop inside the official docker image for STT and it should work. Although with the wrong permissions...

@wasertech wasertech added the bug Something isn't working label May 17, 2022
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

No branches or pull requests

1 participant