This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Problems installing reportlab module: 'No module named future_buildins'
I want to generate PDFs from SQLite output and found the ReportLab Toolkit. A search let me found this thread: Other ways to convert Markdown/HTML to PDF in iOS where hvmhvm wrote that he installed the reportlab module in Editorial. I thought this must also be possible with Pythonista and installed the module with the help from pipista and shellista.
Then I tried to run the example script from the documentation:
Edit: ! This testscript got messed up !
import pipista from reportlab.pdfgen import canvas def hello(c): c.drawString(100,100,"Hello World") c = canvas.Canvas("hello.pdf") c.showPage() hello(c)
In line 2 I got an 'ImportError: No module named future_buildins'
I can't find a way to install the future_builtins module.
Has anyone an idea how I can get reportlab working?
I now realized that the user hvmhvm installed Version 2.7 of the reportlab module while I installed the actual Version 3.1.8. After I deleted Version 3.1.8 and installed Version 2.7 the testscript runs without any errormessages. But I can't find the 'hello.pdf' file that should be saved by the script.
I don't know how it happend, but somehow my testscript got messed up. It should be:
import pipista from reportlab.pdfgen import canvas def hello(c): c.drawString(100,100,"Hello World") c = canvas.Canvas("hello.pdf") hello(c) c.showPage() c.save()
This script works with the 2.7 Version of reportlab and creates the 'hello.pdf' file ... :-) !