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

AssertionError: Got 'Counter-' between two lines. Expected nothing or a preserved line break #313

Closed
robinschoss opened this issue May 2, 2016 · 3 comments
Labels
bug Existing features not working as expected crash Problems preventing documents from being rendered

Comments

@robinschoss
Copy link

On my production server, I get the above error in this context:

Got 'Counter-' between two lines. Expected nothing or a preserved line break
site-packages/uwsgidecorators.py in manage_spool_request at line 60

ret = f(vars)
file = HTML(string=string).write_pdf()

I can NOT reproduce this on the same setup locally, despite the OS, packages, and even database being identical. Any ideas where to start debugging this?

@liZe
Copy link
Member

liZe commented May 2, 2016

@robinschoss thanks for the report.

Debugging this kind of bugs is really difficult. You're right, the first step is to find a way to reproduce the bug… There are many reasons why you can't reproduce, but it's probably related to either:

  • the versions of cairo, pango or harfbuzz that are different on your server and your local setups, or
  • the fonts installed.

As you said that you use the same setup, I think that it's caused by the fonts. That's a very common reason why documents are not the same on different computers, and that's an almost sure reason if you didn't explicitely specified a font family in the CSS.

You can try to render another document with the same CSS on production and see which font is embedded in the generated PDF, then install this font locally, force its use in the CSS and see if you can reproduce the bug.

If it doesn't work, we'll have to find another solution!

@liZe liZe added crash Problems preventing documents from being rendered bug Existing features not working as expected labels May 16, 2016
@liZe
Copy link
Member

liZe commented May 16, 2016

@robinschoss Did you find a solution to reproduce this bug?

@liZe
Copy link
Member

liZe commented Nov 22, 2016

Probably fixed now that #389 is fixed.

@liZe liZe closed this as completed Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected crash Problems preventing documents from being rendered
Projects
None yet
Development

No branches or pull requests

2 participants