Skip to content

Error: Unable to access jarfile under Cygwin #20

@Lucas-C

Description

@Lucas-C

Hello,

I'm trying to write a pre-commit hook to do some HTML validation using your lib:
Lucas-C/pre-commit-hooks@2916a99

However I'm facing this error when using html5validator.validator.Validator:

Error: Unable to access jarfile /home/lucas_cimon/.pre-commit/repor9ky908h/py_env-default/lib/python3.4/site-packages/vnujar/vnu.jar

I replicated this issue by invoking the command directly:

$ java -jar /home/lucas_cimon/.pre-commit/repor9ky908h/py_env-default/lib/python3.4/site-packages/vnujar/vnu.jar vignette.hbs
Error: Unable to access jarfile /home/lucas_cimon/.pre-commit/repor9ky908h/py_env-default/lib/python3.4/site-packages/vnujar/vnu.jar

Note that I'm working under Windows with Cygwin.
A StackOverflow answer to this issue suggested to move the jar in my current directory, and it does work when I invoke it manually:

$ java -jar vnu.jar vignette.hbs                                                            "file:/G:.../vignette.hbs":1.1-2.72: error: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
"file:/G:/.../vignette.hbs":1.1-2.72: error: Element “head” is missing a required instance of child element “title”.
"file:/G:/.../vignette.hbs":1.1-2.72: error: Bad value “{{offer.url}}” for attribute “href” on element “a”: Illegal character in path segment: “{” is not allowed.
"file:/G:/.../vignette.hbs":5.9-5.66: error: Bad value “{{imgSrc}}” for attribute “src” on element “img”: Illegal character in path segment: “{” is not allowed.

Would you have any explanation for this strange problem ?
I'm going to try to modify html5validator/validator.py locally to change the current directory before the .jar invocation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions