[scribus] Problèmes avec lancement de script

Gregory Pittman gpittman at iglou.com
Mon Jul 31 23:02:37 UTC 2017


On 07/31/2017 04:15 PM, Ronan Patrix wrote:
> 
> 
> Le 31/07/2017 à 03:28, Gregory Pittman a écrit :
> 
> On 07/30/2017 01:07 PM, Ronan Patrix wrote:
> 
> 
> Bonjour à tous,
> 
> Je tente de réutiliser le script présenté ici
> (https://wiki.scribus.net/canvas/Printing_4-up_tickets_to_hard_copy_printer)
> pour réaliser un facturier avec une incrémentation de la numérotation
> avant l'enregistrement en pdf de chaque fichier, et je tombe sur cette
> erreur :
> 
> Traceback (most recent call last):
>     File "<string>", line 8, in <module>
> IOError: [Errno 2] No such file or directory:
> 'E:\\_MonDossier\\0_Mod\xc3\xa8les\\Factures_A5.py'
> 
> 
> Thanks for your answer , I first emailed back only to you so lets share.
> Most of the mistakes quoted above are on the original code (see link in my first email), I only replaced the hard print part with pdf saving function.
> I finally found a solution good enough for me, by typing this command in the console :
> 
> for idx in range(3):
> 
>     setText("F4431780" + `(idx)`, "Fnbr1")
> 
>     setText("F4431780" + `(idx)`, "Fnbr2")
> 
>     setText("F4431780" + `(idx)`, "Fnbr3")
> 
>     filename = ("F4431780" + `(idx)`)
> 
>     pdf = scribus.PDFfile()
> 
>     pdf.file = filename+".pdf"
> 
>     pdf.save()
> 
> 
> But if I try to load any external python script file, I still get the same error message, is there a specific configuration to tune in scribus to make external script working ?

This looks like some kind of Windows problem. Have you set the path for
scripts in Preferences? See if that helps. I have Win7 on VM, and don't
see problems finding scripts. You might also try installing 1.5.3, which
is now available, and may cause fewer problems in general.

Greg



More information about the scribus mailing list