Just for the record ... I solved this by deleting the virtualenv and all 
user installed libraries (using 'pip uninstall ...').  Then simply 
reinstalling 'pip install --user weasyprint==0.27'

I never found the root cause of the problem.  Here is the conversation on 
PAW with some more info if anybody in the future needs it ...
https://www.pythonanywhere.com/forums/topic/4898/#id_post_21876


On Tuesday, June 14, 2016 at 3:57:34 PM UTC-7, Michael Beller wrote:
>
> I posted this on the pythonanywhere (PAW) forums also but I think it may 
> be web2py specific (or at least specific to the PAW/web2py combination) ...
>
> I'm using weasyprint to generate a PDF.  It's working on my local dev 
> environment and my PAW personal account.
>
> On a new PAW account it fails on:
> from weasyprint import HTML, CSS
>
> with the error:
> OSError: dlopen() failed to load a library: cairo / cairo-2
>
> On the new PAW account, the import works in a python console (just not 
> from within the web2py app).
>
> As far as I can tell, the original and new PAW accounts are identical.  I 
> also recently create a new virtualenv on the new account to try and isolate 
> the library/package that may be out of sync but I'm getting the same error.
>
> Any ideas how to debug?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to