[scribus] Python scripting issue with ImageWriter - "NoneType object is not callable" error
amarcon.work at gmail.com
Mon Apr 4 21:39:30 UTC 2016
Thank you Juraj for your answer!
I tried to run your code from within Scribus and it failed with the same
error as mine!
It may be you're right, and the python that scribus uses cannot find PIL
module. I'll try to work on that!
I'm sorry I didn't include info about OS and Scribus version...newbie
I'm running Scribus 1.4.5 on Windows7!
I'll let you guys know if I'll be able to work this out!
2016-04-01 9:00 GMT+02:00 Juraj Fedel <wtxnh-scribus at yahoo.com.au>:
> On Fri, Apr 01, 2016 at 02:10:19AM +0200, Andrea Marcon wrote:
> > I managed to get what I need from Python directly, using pyBarcode
> > (actually I've used a fork - viivakoodi
> > <https://pypi.python.org/pypi/viivakoodi>), saving the barcode images
> > then importing them in Scribus by means of another script.
> From website i learned that viivakoodi depends on PIL to write png
> I created simple script from example provided by viivakoodi :
> === bar.py
> import barcode
> from barcode.writer import ImageWriter
> ean = barcode.get('ean13', '123456789102', writer = ImageWriter())
> filename = ean.save('ean13')
> When i run this script from scribus as:
> scribus-1.5.2.svn -g -py bar.py
> i do find ean13.png file created.
> This script also produce desired png if I run scrip from scribus using
> GUI menu (Scripter -> Execute Script ...)
> It is hard to guess why you have your problem. Next time try to include
> info about OS you are running on, python version, scribus version etc...
> If you are on Windows platform, it might be that python you run your
> script manualy, and the one you run from scribus is not the same and
> later one can not find PIL library. I would restrain myself from further
> guessing about environment you run your programs on.
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> See also:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scribus