Skip to content

Instantly share code, notes, and snippets.

@mugizico
Last active September 26, 2016 20:59
Show Gist options
  • Save mugizico/1465aced7092b50d96e59e7849538322 to your computer and use it in GitHub Desktop.
Save mugizico/1465aced7092b50d96e59e7849538322 to your computer and use it in GitHub Desktop.
Pa11y-Crawl Installation and Running issues

pa11y-crawl was not running as desired on computer.

  • Running 'pa11y-crawl -v' yields cat: no package.json file or directory found

solution: none figured out so far still a work in progress

  • Running 'pa11y-crawl -d /path/to/dir' loops you back to the Usage: pa11y-crawl [options] <URL> Options:…. message

solution: make sure to provide a third argument like so pa11y-crawl -d /path/to/dir whatever
for e.g pa11y-crawl -d _site 18fsite the last argument is because the command is set to show the help if there’s no non-option arguments (which is what the url would be, in most cases)

  • Running 'pa11y-crawl [URL]' gives the following error
>>>  using wget to mirror site
/usr/local/bin/pa11y-crawl: line 254: wget: command not found
<<<  found 0 files in 0 directories
>>>  beginning the analysis
|---------------------------------------
 File "<string>", line 1
   import sys, os.path; print os.path.relpath(sys.argv[1], sys.argv[2])
                               ^
SyntaxError: invalid syntax
||    is not an html document, skipping
>>>  cleaning up
```

  **solution**:

   - install wget   `brew install wget`
   - install python 2.7.11 with pyenv like so `pyenv install 2.7.11`
   - run `pyenv local 2.7.11`
   - run `pa11y-crawl ` command(s)

 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment