[scribus] Python scripting issue with ImageWriter - "NoneType object is not callable" error
amarcon.work at gmail.com
Thu Mar 31 23:25:59 UTC 2016
I'm a Python newbie and I'm trying to automatize a task within Scribus.
I'm producing a large number of labels - for boxes containing products -
that need to have the barcode of the product.
I've written a stand-alone python script that read the numerical code from
a csv and create a png image, then I wrote another script (run from in
within Scribus) that creates the layout of the labels and pastes the
previously created images.
I decided to include (i.e. copy-paste) the stand-alone script for barcode
creation into the Scribus-related one, and it's not working anymore!
I inserted the stand-alone code as a function, and I call it in the main()
It seems that Python, when working from Scribus scripter, does not
recognise ImageWriter (from pyBarcode).
The error it returns is:
*var = barcode.get_barcode('Code128', '1234567891234', writer=
*TypeError: 'NoneType' object is not callable*
I'm kinda sure the problem lays in the "imageWriter()" part, because when I
took it out the script worked fine, except that produced SVG images instead
of PNG (as it's supposed to), and that the method's options for modifying
the resulting SVG image (i.e. dimensions and font size) are not working!
Does anybody know what's happening or how to solve it?
Thank you very much for any hint!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scribus