Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import url with querystring error #80

Open
hzrari opened this issue Dec 21, 2015 · 2 comments
Open

Import url with querystring error #80

hzrari opened this issue Dec 21, 2015 · 2 comments

Comments

@hzrari
Copy link

hzrari commented Dec 21, 2015

Hi,

I am trying to compile a less file containing a querystring in importurl state. This is resulting an exception.

The state:

@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700,900);

The exception:

Traceback (most recent call last):
  File "/my/pathenv/bin/lesscpy", line 11, in <module>
    sys.exit(run())
  File "/my/pathenv/lib/python2.7/site-packages/lesscpy/scripts/compiler.py", line 177, in run
    p.parse(filename=args.target, debuglevel=args.debug)
  File "/my/pathenv/lib/python2.7/site-packages/lesscpy/lessc/parser.py", line 153, in parse
    file, lexer=self.lex, debug=debuglevel)
  File "/my/pathenv/lib/python2.7/site-packages/ply/yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/my/pathenv/lib/python2.7/site-packages/ply/yacc.py", line 1049, in parseopt_notrack
    lookahead = get_token()     # Get the next token
  File "/my/pathenv/lib/python2.7/site-packages/lesscpy/lessc/lexer.py", line 489, in token
    t = self.lexer.token()
  File "/my/pathenv/lib/python2.7/site-packages/ply/lex.py", line 386, in token
    newtok = self.lexerrorf(tok)
  File "/my/pathenv/lib/python2.7/site-packages/lesscpy/lessc/lexer.py", line 448, in t_error
    (t.value[0], t.lexer.lineno))
SyntaxError: Illegal character '?' line 65

In the meanwhile, I am trying to understand the source code to try to help

Thank you very much for this great package
Regards
@austintrose
Copy link

austintrose commented May 17, 2016

I've also run into this issue, and would like to point out that it also fails even if there are quotation marks around the URL.

$ echo "@import url(\"https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,100,700\");" > in.less

$ cat in.less
@import url("https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,100,700");

$ lessc in.less
@import url("https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,100,700");

$ lesscpy in.less
W: line: 1: Cannot import '/Users/atrose/Github/strongarm/https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,100,700.less', file not found

@mckea
Copy link

mckea commented Dec 19, 2018

I also experience this. It worked prior to upgrading to python3, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants