We use cookies and other tools to enhance your experience on our website and to analyze our web traffic.
For more information about these cookies and the data collected, please refer to our Privacy Policy.

fwajid

fwajid
Joined Mar 2021
Bio

College Park, Maryland

fwajid
Joined Mar 2021
Bio

College Park, Maryland

Upon downloading the dataset, I receive a bad URI error, shown below:

  create shhs/forms/
  create shhs/forms/shhs1/

/home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): "https://sleepdata.org/datasets/shhs/files/a/11463-PyYzG-3vzWir7y16cRmx/m/nsrr-gem-v6-0-0/forms/shhs1/SHHS 1 Adverse Events Form.pdf" (URI::InvalidURIError) from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/uri/rfc3986_parser.rb:72:in parse' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/uri/common.rb:171:inparse' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/helpers/download_request.rb:20:in initialize' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/file.rb:61:innew' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/file.rb:61:in force_download' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/file.rb:39:indownload' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:104:in block in download_helper' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:102:ineach' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:102:in download_helper' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:117:inblock in download_helper' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:116:in each' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:116:indownload_helper' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:117:in block in download_helper' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:116:ineach' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:116:in download_helper' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/models/dataset.rb:80:indownload' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/commands/download.rb:38:in run' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr/commands/download.rb:14:inrun' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr.rb:26:in download' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/lib/nsrr.rb:16:inlaunch' from /home/labman/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/nsrr-6.0.0/bin/nsrr:6:in &lt;top (required)>' from /home/labman/.rvm/gems/ruby-3.0.0/bin/nsrr:23:inload' from /home/labman/.rvm/gems/ruby-3.0.0/bin/nsrr:23:in `<main>'

Here are my Ruby and Gems versions:

$> ~/.rvm/gems/ruby-3.0.0/bin/nsrr -v

Nsrr 6.0.0

$> ruby -v

ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]

It seems the problem is the spaces in the filename being retrieved : https://sleepdata.org/datasets/shhs/files/a/11463-PyYzG-3vzWir7y16cRmx/m/nsrr-gem-v6-0-0/forms/shhs1/ SHHS 1 Adverse Events Form.pdf

The resource exists (can just paste the link into my browser, which will replace spaces with %20) however I am not sure how to do this directly in the download process, or if there is a replacement resource available.

RESOLUTION: I manually downloaded the files in forms/shhs1 and shhs2 and placed them in the appropriate directories so the downloader can continue, but this could be a problem for future downloaders.

The files are accessible here: https://sleepdata.org/datasets/shhs/files/forms/shhs1 and https://sleepdata.org/datasets/shhs/files/forms/shhs2