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

FileNotFoundError: [Errno 2] No such file or directory: 'data_path/GQA/GQA_scenegraphs.tar' #1

Closed
riven314 opened this issue May 25, 2020 · 4 comments

Comments

@riven314
Copy link

Thanks for the amazing work! I am trying to reproduce your work but encountered the following error. I guess it is probably because the data link is not accessible:

$ python main.py -data data_path -loss dnorm -save_dir VG_sgcls

GQA data_path/GQA
Downloading GQA (can take a few hours
downloading data_path/GQA/GQA_scenegraphs.tar ...
/data_path/GQA/GQA_scenegraphs.tar: No such file or directory
return code for data_path/GQA/GQA_scenegraphs.tar = 1
extracting data_path/GQA/GQA_scenegraphs.tar to data_path/GQA
Traceback (most recent call last):
  File "main.py", line 11, in <module>
    conf = ModelConfig()
  File "/userhome/34/h3509807/scene_graph/sgg/config.py", line 120, in __init__
    download_all_data(self.data)
  File "/userhome/34/h3509807/scene_graph/sgg/lib/download.py", line 48, in download_all_data
    download(link, data_dir)
  File "/userhome/34/h3509807/scene_graph/sgg/lib/download.py", line 28, in download
    tar = tarfile.open(filename)
  File "/userhome/31/h3509807/anaconda3/envs/pytorch/lib/python3.6/tarfile.py", line 1571, in open
    return func(name, "r", fileobj, **kwargs)
  File "/userhome/31/h3509807/anaconda3/envs/pytorch/lib/python3.6/tarfile.py", line 1636, in gzopen
    fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
  File "/userhome/31/h3509807/anaconda3/envs/pytorch/lib/python3.6/gzip.py", line 163, in __init__
    fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'data_path/GQA/GQA_scenegraphs.tar'
@bknyaz
Copy link
Owner

bknyaz commented May 26, 2020

Hi, thanks for reporting this. There was an issue with a relative data path in my code. I fixed it, so you can git pull and try again.

@riven314
Copy link
Author

riven314 commented May 26, 2020

Hi @bknyaz , thanks for the fix. I can download and extract GQA now, but got the following error for VG:

data_path/GQA/GQA_scenegrap 100%[========================================>] 164.77M  10.6MB/s    in 17s

2020-05-26 20:24:44 (9.67 MB/s) - ‘data_path/GQA/GQA_scenegraphs.tar’ saved [172779386/172779386]

return code for data_path/GQA/GQA_scenegraphs.tar = 0
extracting data_path/GQA/GQA_scenegraphs.tar to data_path/GQA
VG data_path/VG
Downloading VG (can take a few hours
Traceback (most recent call last):
  File "main.py", line 11, in <module>
    conf = ModelConfig()
  File "/userhome/34/h3509807/scene_graph/sgg/config.py", line 120, in __init__                                  download_all_data(self.data)
  File "/userhome/34/h3509807/scene_graph/sgg/lib/download.py", line 48, in download_all_data                    download(link, data_dir)
  File "/userhome/34/h3509807/scene_graph/sgg/lib/download.py", line 20, in download
    filename = os.path.join(data_dir, urlparse.parse_qs(urlparse.urlparse(file_info['href']).query)['filename'][0])
KeyError: 'href'

@bknyaz
Copy link
Owner

bknyaz commented May 26, 2020

It is the server error, which happens from time to time, so there are two options:

  1. try running the script later
  2. go to the links specified in https://github.com/bknyaz/sgg/blob/master/lib/download.py#L11 and L12
    using your browser and download arhives manually, then put them to data_path according to https://github.com/bknyaz/sgg/blob/master/README.md

@bknyaz
Copy link
Owner

bknyaz commented Jun 9, 2020

closing due to the lack of activity here, feel free to reopen if it doesn't work

@bknyaz bknyaz closed this as completed Jun 9, 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