svenkreiss / html5validator

Command line tool to validate HTML5 files. Great for continuous integration.
MIT License
314 stars 34 forks source link

No attribute 'check_output' #15

Closed egberts closed 8 years ago

egberts commented 8 years ago

When building html5validator on CentOS 6.5 using 'python setup.py install', executing the html5validator resulted in the following error:

html5validator --root tests/multiple_ignores/ --ignore-re 'Attribute "ng-[a-z-]+" not allowed' 'Start tag seen without seeing a doctype first'
Traceback (most recent call last):
  File "/usr/bin/html5validator", line 9, in <module>
    load_entry_point('html5validator==0.2.1', 'console_scripts', 'html5validator')()
  File "/usr/lib/python2.6/site-packages/html5validator-0.2.1-py2.6.egg/html5validator/cli.py", line 69, in main
    stack-size=args.stack-size,
  File "/usr/lib/python2.6/site-packages/html5validator-0.2.1-py2.6.egg/html5validator/validator.py", line 84, in validate
    o = subprocess.check_output(['java', '-jar',
AttributeError: 'module' object has no attribute 'check_output'
$

I've got the following installed:

java version "1.7.0_91"
OpenJDK Runtime Environment (rhel-2.6.2.2.el6_7-x86-64 u91-b000)
penJDK 64-Bit Server VM (build 24.91-b01, mixed mode)

Python 2.6.6
svenkreiss commented 8 years ago

Unfortunately, Python 2.6 is missing some functionality. Python 2.7, 3.4 and 3.5 are supported. Also, the underlying Java package requires Java 8 now and you seem to have Java 7.