Closed arthurlutz closed 12 years ago
Sure: let's do #civicmedia on freenode. I'm there now.
What is the type of letter you were generating? Is it a consent form, comments printout, or first post printout?
If it's comments or a first post, I suspect possible issues with wkhtmltopdf. If it's a consent form, I suspect the path to the license agreement pdf might not be set in admin.
We determined that the ultimate source of this problem was that the django Site model had its domain set to example.com
(the default), which resulted in wkhtmltopdf being unable to print the posts. Documentation is added now: http://dev-docs.betweenthebars.org/en/latest/installation.html#set-the-site-name-in-admin
I believe the problem is that 000001.pdf is an empty file is why it fails.
Do you hang out on IRC or on a jabber/xmpp group where we could more easily interact on these small bugs ? Keeping track of these could be useful to others but it might be easier to chat about these issues.
Environment:
Request Method: GET Request URL: http://localhost:8000/correspondence/letter/14
Django Version: 1.4 Python Version: 2.7.3 Installed Applications: ('about', 'accounts', 'annotations', 'blogs', 'btb', 'comments', 'correspondence', 'moderation', 'profiles', 'subscriptions', 'scanning', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.humanize', 'django.contrib.admin', 'django.contrib.flatpages', 'django.contrib.messages', 'django.contrib.staticfiles', 'registration', 'djcelery', 'django_bcrypt', 'lettuce.django', 'compressor', 'sorl.thumbnail', 'notification', 'pagination', 'urlcrypt', 'south') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'pagination.middleware.PaginationMiddleware')
Traceback: File "/home/arthur/local/btb/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
Exception Type: Exception at /correspondence/letter/14 Exception Value: Combining pdfs failed: /usr/bin/pdftk /tmp/combinepdfsztyMXF/000000.pdf /tmp/combinepdfsztyMXF/000001.pdf cat output /tmp/tmpo1d68t.pdf