openphilanthropy / unrestricted-adversarial-examples

Contest Proposal and infrastructure for the Unrestricted Adversarial Examples Challenge
Apache License 2.0
327 stars 62 forks source link

Spaces in directory name causing issues #70

Closed akern40 closed 5 years ago

akern40 commented 5 years ago

The wget command in bird-or-bicycle-download does not surround the target directory name with quotes, which causes wget to fail:

wget https://storage.googleapis.com/openimages/2018_04/train/train-annotations-bbox.csv -O /Users/adamkern/Documents/Senior Year/Adversarial AI CSE 544T/final-project/source/unrestricted-adversarial-examples/bird-or-bicycle/bird_or_bicycle/metadata/train-annotations-bbox.csv
--2019-02-11 23:04:06--  https://storage.googleapis.com/openimages/2018_04/train/train-annotations-bbox.csv
Resolving storage.googleapis.com (storage.googleapis.com)... 172.217.8.208
Connecting to storage.googleapis.com (storage.googleapis.com)|172.217.8.208|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1194033454 (1.1G) [text/csv]
Saving to: ‘/Users/adamkern/Documents/Senior’

/Users/adamkern/Documents/Senior                    100%[===================================================================================================================>]   1.11G  18.3MB/s    in 56s

2019-02-11 23:05:02 (20.3 MB/s) - ‘/Users/adamkern/Documents/Senior’ saved [1194033454/1194033454]

--2019-02-11 23:05:02--  http://year/Adversarial
Resolving year (year)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘year’
--2019-02-11 23:05:02--  http://ai/
Resolving ai (ai)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘ai’
--2019-02-11 23:05:02--  http://cse/
Resolving cse (cse)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘cse’
--2019-02-11 23:05:02--  http://544t/final-project/source/unrestricted-adversarial-examples/bird-or-bicycle/bird_or_bicycle/metadata/train-annotations-bbox.csv
Resolving 544t (544t)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘544t’
FINISHED --2019-02-11 23:05:02--
Total wall clock time: 56s
Downloaded: 1 files, 1.1G in 56s (20.3 MB/s)
Traceback (most recent call last):
  File "/Users/adamkern/miniconda3/bin/bird-or-bicycle-download", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/adamkern/Documents/Senior Year/Adversarial AI CSE 544T/final-project/source/unrestricted-adversarial-examples/bird-or-bicycle/bin/bird-or-bicycle-download", line 13, in <module>
    bird_or_bicycle.get_dataset(split, force_download=True)
  File "/Users/adamkern/Documents/Senior Year/Adversarial AI CSE 544T/final-project/source/unrestricted-adversarial-examples/bird-or-bicycle/bird_or_bicycle/dataset.py", line 253, in get_dataset
    label_name_to_image_ids = _get_extras_image_ids()
  File "/Users/adamkern/Documents/Senior Year/Adversarial AI CSE 544T/final-project/source/unrestricted-adversarial-examples/bird-or-bicycle/bird_or_bicycle/dataset.py", line 81, in _get_extras_image_ids
    check_output(cmd, shell=True)
  File "/Users/adamkern/miniconda3/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/Users/adamkern/miniconda3/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'wget https://storage.googleapis.com/openimages/2018_04/train/train-annotations-bbox.csv -O /Users/adamkern/Documents/Senior Year/Adversarial AI CSE 544T/final-project/source/unrestricted-adversarial-examples/bird-or-bicycle/bird_or_bicycle/metadata/train-annotations-bbox.csv' returned non-zero exit status 4.
carlini commented 5 years ago

That's what you get for put spaces in directory paths. WONTFIX.

Okay, more seriously, thanks for catching this. The commit you've made looks good if you want to submit a PR we'll definitely take it.

akern40 commented 5 years ago

Glad my poorly-named directory structure could be of some use! Thanks!