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

'ValueError: too many values to unpack (expected 3)' on substraction using 'ch' unit #111

Open
mgorny opened this issue May 18, 2020 · 1 comment

Comments

@mgorny
Copy link

mgorny commented May 18, 2020

I was trying to switch from sass to less, and I've missed one:

max-width: @page-width - 1ch;

lesscpy crashed on that:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.8/lesscpy", line 11, in <module>
    load_entry_point('lesscpy==0.14.0', 'console_scripts', 'lesscpy')()
  File "/usr/lib/python3.8/site-packages/lesscpy/scripts/compiler.py", line 236, in run
    p.parse(filename=args.target, debuglevel=args.debug)
  File "/usr/lib/python3.8/site-packages/lesscpy/lessc/parser.py", line 154, in parse
    self.post_parse()
  File "/usr/lib/python3.8/site-packages/lesscpy/lessc/parser.py", line 166, in post_parse
    out.append(pu.parse(self.scope))
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/block.py", line 42, in parse
    inner = list(utility.flatten([p.parse(scope) for p in inner if p]))
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/block.py", line 42, in <listcomp>
    inner = list(utility.flatten([p.parse(scope) for p in inner if p]))
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/block.py", line 42, in parse
    inner = list(utility.flatten([p.parse(scope) for p in inner if p]))
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/block.py", line 42, in <listcomp>
    inner = list(utility.flatten([p.parse(scope) for p in inner if p]))
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/property.py", line 38, in parse
    self.parsed = self.process(style, scope)
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/node.py", line 45, in process
    tokens = [
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/node.py", line 46, in <listcomp>
    t.parse(scope) if hasattr(t, 'parse') else t
  File "/usr/lib/python3.8/site-packages/lesscpy/plib/expression.py", line 35, in parse
    A, O, B = [
ValueError: too many values to unpack (expected 3)
@mgorny mgorny changed the title 'ValueError: too many values to unpack (expected 3)' on sass-like arithmetic syntax 'ValueError: too many values to unpack (expected 3)' on substraction using 'ch' unit May 18, 2020
@mgorny
Copy link
Author

mgorny commented May 18, 2020

Hmm, that actually seems valid LESS and lessc seems to handle it just fine.

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

1 participant