[scribus] Error when running 'bcaption.py' with create caption modification

Gregory Pittman gpittman at iglou.com
Mon Jan 8 19:40:23 UTC 2018

On 01/08/2018 01:10 PM, David Danforth wrote:
> First, to Gregory Chapman:  Thanks for your series of scripts for
> creating captions.  I am finding them very useful indeed!
> Second to GC or anyone who might know the answer:  When I run
> 'bcatpion.py with the create caption modification the following error
> message is returned:
> Traceback (most recent call last): File "<string>", line 8, in <module>
> File "C:\Program Files\Scribus
> 1.4.6\share\scripts\Caption_bottom_styled.py", line 58, in <module>
> scribus.createCharStyle("captionchar",font= "Liberation Serif Italic",
> fontsize=10.0, fillcolor=1) TypeError: coercing to Unicode: need string
> or buffer, int found
> I do not have a "Caption" style created.  I am running Scribus 1.4.6 on
> Windows 10.

I have to say that when I wrote that script I was rather naive about the
challenges of creating character and paragraph styles. I probably also
didn't try it on 1.4.6.

Change the two style-creating lines to this:

    scribus.createCharStyle("captionchar","Liberation Serif Italic",
10.0, 'Black')

I recently wrote a wiki page about these challenges and solutions:



More information about the scribus mailing list