-
Notifications
You must be signed in to change notification settings - Fork 570
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
Error in cssreformatter: -5 #394
Comments
Well that certainly sucks. I've not had a bit of trouble reformatting any css in any version of Windows (Windows 10 included). I see the problem, but I can't fix it without changing the source. And that means retagging and making a new release for an underscore character. If you can change line 68 of C:\Program Files\Sigil\python3lib\cssreformatter.py from: to: You should be able to get by until we get it fixed. You'll need to have elevated privileges to write to that file. |
Yes, that is definitely bug. There is a typi In line 68 that should be css_parser not cssparser in cssreformatter.py
Macs use the source python files inside the app so a user could technically edit that file inside the app and fix that issue. Not sure on Windows.
We will fix this for the next release. Sorry about that.
… On Feb 16, 2019, at 8:17 PM, mrprobert ***@***.***> wrote:
Environment: Windows 10 Pro 64-bit version 1809
Sigil 0.9.11
Qt 5.11.2
I upgraded from 0.9.10 to 0.9.11. Opened an existing epub2 (passed FlightCrew and W3C checks.) Reformatting the stylesheet fails.
Embedded Python Error
Error in cssreformatter: -5
Traceback (most recent call last):
File "C:/Program Files/Sigil/python3lib\cssreformatter.py", line 191, in reformat_css
new_css_string = parsed_css.cssText.decode('utf-8', errors='replace')
File "C:/Program Files/Sigil/plugin_launchers/python\css_parser\css\cssstylesheet.py", line 139, in _getCssText
return css_parser.ser.do_CSSStyleSheet(self)
File "C:/Program Files/Sigil/python3lib\cssreformatter.py", line 42, in do_CSSStyleSheet
cssText = rule.cssText
File "C:/Program Files/Sigil/plugin_launchers/python\css_parser\css\cssfontfacerule.py", line 76, in _getCssText
return css_parser.ser.do_CSSFontFaceRule(self)
File "C:/Program Files/Sigil/python3lib\cssreformatter.py", line 68, in do_CSSFontFaceRule
out = cssparser.serialize.Out(self)
NameError: name 'cssparser' is not defined
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Should be able to fix it on Windows, too. They'll just need to open an editor as admin to be able to make the changes. |
Let's push the fix so Linux distros can cherry-pick it if they want. |
I can cherry-pick a fix while releasing, although most Windows/macOS users would probably appreciate a bugfix release; still, your choice whether to immediately tag a new release for one fix or to hold off and see if any other post-release bugs crop up first. At least it was found quickly, proving it's popular enough to get lots of immediate use. :D |
I pushed a fix for this particular bug: a7b465e But I think we're going to wait a day or two before putting out a new release just in case some other issues happen to shake out. |
I made the edit and all seems fine. Thank you for the quick turnaround.
- Mark
…On Sat, Feb 16, 2019 at 5:35 PM Doug Massay ***@***.***> wrote:
Well that certainly sucks. I've not had a bit of trouble reformatting any
css in any version of Windows (Windows 10 included).
I see the problem, but I can't fix it without changing the source. And
that means retagging and making a new release for an underscore character.
If you can change line 68 of C:\Program
Files\Sigil\python3lib\cssreformatter.py from:
out = cssparser.serialize.Out(self)
to:
out = css_parser.serialize.Out(self)
You should be able to get by until we get it fixed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#394 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMlR7cnvhDVCwSanNOykD4HBlRfP20V1ks5vOLHPgaJpZM4a_S55>
.
|
FWIW, I had already uploded 0.9.11 to debian unstable yesterday. Since we already started the freeze for the next stable and will be a bit of a mess to do big updates (like 0.9.10 → 0.9.11) after the March 2nd, I plan to wait until the current (buggy) upload migrate to testing in 9 days, so that even if I end up needing to ask for an exception after March 2nd is easier to get it granted. Hopefully by then if there are more deep hidden regressions in 0.9.11 they will be found and a fixup 0.9.12 will appear :) |
Closing as this is fixed in 0.9.12 |
Environment: Windows 10 Pro 64-bit version 1809
Sigil 0.9.11
Qt 5.11.2
I upgraded from 0.9.10 to 0.9.11. Opened an existing epub2 (passed FlightCrew and W3C checks.) Reformatting the stylesheet fails.
Embedded Python Error
Error in cssreformatter: -5
Traceback (most recent call last):
File "C:/Program Files/Sigil/python3lib\cssreformatter.py", line 191, in reformat_css
new_css_string = parsed_css.cssText.decode('utf-8', errors='replace')
File "C:/Program Files/Sigil/plugin_launchers/python\css_parser\css\cssstylesheet.py", line 139, in _getCssText
return css_parser.ser.do_CSSStyleSheet(self)
File "C:/Program Files/Sigil/python3lib\cssreformatter.py", line 42, in do_CSSStyleSheet
cssText = rule.cssText
File "C:/Program Files/Sigil/plugin_launchers/python\css_parser\css\cssfontfacerule.py", line 76, in _getCssText
return css_parser.ser.do_CSSFontFaceRule(self)
File "C:/Program Files/Sigil/python3lib\cssreformatter.py", line 68, in do_CSSFontFaceRule
out = cssparser.serialize.Out(self)
NameError: name 'cssparser' is not defined
The text was updated successfully, but these errors were encountered: