I'm trying to render a list of all first names in my auth_user table in a pdf but an error (the one in this question's title) slaps me in the face! Need some help figuring out how to resolve it.
Controller def finish(): users = db().select(db.auth_user.ALL) return dict(users=users) View (finish.html) {{for user in users:}} {{=user.first_name}} {{pass}} View (finish.pdf) {{ import os from gluon.contrib.generics import pdf_from_html filename = '%s/%s.html' % (request.default,request.finish) if os.path.exists(os.path.join(request.folder,'views',filename)): html=response.render(filename) else: html=BODY(BEAUTIFY(response._vars)).xml() pass =pdf_from_html(html) }} Error ticket <type 'exceptions.RuntimeError'> Table column/cell width not specified, unable to continue Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Traceback (most recent call last): File "/home/mdipierro/make_web2py/web2py/gluon/restricted.py", line 212, in restricted File "E:\Users\Samuel\Downloads\web2py_win\web2py\applications\admissions\views\default/finish.pdf", line 9, in <module> File "/home/mdipierro/make_web2py/web2py/gluon/contrib/generics.py", line 72, in pdf_from_html File "/home/mdipierro/make_web2py/web2py/gluon/contrib/generics.py", line 63, in pyfpdf_from_html File "/home/mdipierro/make_web2py/web2py/gluon/contrib/fpdf/html.py", line 397, in write_html File "HTMLParser.pyc", line 108, in feed File "HTMLParser.pyc", line 142, in goahead File "/home/mdipierro/make_web2py/web2py/gluon/contrib/fpdf/html.py", line 74, in handle_data RuntimeError: Table column/cell width not specified, unable to continue ------------------------------------------------------------------------------------------------------------------------------------------------------------- 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. import os from gluon.contrib.generics import pdf_from_html filename = '%s/%s.html' % (request <http://127.0.0.1:8000/examples/global/vars/request>.default,request <http://127.0.0.1:8000/examples/global/vars/request>.finish) if os.path.exists(os.path.join(request <http://127.0.0.1:8000/examples/global/vars/request>.folder,'views',filename)): html=response <http://127.0.0.1:8000/examples/global/vars/response>.render(filename) else: html=BODY <http://127.0.0.1:8000/examples/global/vars/BODY>(BEAUTIFY <http://127.0.0.1:8000/examples/global/vars/BEAUTIFY>(response <http://127.0.0.1:8000/examples/global/vars/response>._vars)).xml() pass response <http://127.0.0.1:8000/examples/global/vars/response>.write(pdf_from_html(html)) response <http://127.0.0.1:8000/examples/global/vars/response>.write('\r\n', escape=False) I need help fixing this error -- 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.