Kronuz/pyScss

pyScss can't compile Bulma

mfeif opened this issue · 0 comments

mfeif commented

Bulma is a CSS "framework" based on Sass. As of this writing, version 0.9.1 is current; I'm able to download it and compile it with my sass CLI utility (the Dart Sass version 1.17.2) without warnings.

On pyScss from current release on pypi and in master, I get this error:

$ python -m scss bulma.sass
Traceback (most recent call last):
  File "/Users/mjf/.pyenv/versions/3.8.5/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/mjf/.pyenv/versions/3.8.5/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/mjf/.pyenv/versions/stcko/lib/python3.8/site-packages/scss/__main__.py", line 3, in <module>
    scss.tool.main()
  File "/Users/mjf/.pyenv/versions/stcko/lib/python3.8/site-packages/scss/tool.py", line 145, in main
    do_build(options, args)
  File "/Users/mjf/.pyenv/versions/stcko/lib/python3.8/site-packages/scss/tool.py", line 181, in do_build
    source = SourceFile.from_filename(path, is_sass=options.is_sass)
  File "/Users/mjf/.pyenv/versions/stcko/lib/python3.8/site-packages/scss/source.py", line 198, in from_filename
    return cls.from_path(path, origin, **kwargs)
  File "/Users/mjf/.pyenv/versions/stcko/lib/python3.8/site-packages/scss/source.py", line 190, in from_path
    return cls.from_file(f, origin, relpath, **kwargs)
  File "/Users/mjf/.pyenv/versions/stcko/lib/python3.8/site-packages/scss/source.py", line 209, in from_file
    encoding = determine_encoding(contents)
  File "/Users/mjf/.pyenv/versions/stcko/lib/python3.8/site-packages/scss/cssdefs.py", line 416, in determine_encoding
    end = buf.index(charset_end, start)
ValueError: subsection not found

FWIW, this is the contents of bulma.scss:

@charset "utf-8"
/*! bulma.io v0.9.1 | MIT License | github.com/jgthms/bulma */
@import "sass/utilities/_all"
@import "sass/base/_all"
@import "sass/elements/_all"
@import "sass/form/_all"
@import "sass/components/_all"
@import "sass/grid/_all"
@import "sass/helpers/_all"
@import "sass/layout/_all"

As per the readme, I'm submitting a bug :-)