Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scribus 1.5.1 - Generator does not work #54

Closed
RykF opened this issue Aug 8, 2016 · 17 comments
Closed

Scribus 1.5.1 - Generator does not work #54

RykF opened this issue Aug 8, 2016 · 17 comments

Comments

@RykF
Copy link

RykF commented Aug 8, 2016

There are two versions of Scribus on my hard drive: One is Scribus 1.4.6 and one is 1.5.1

I noticed that the original tool by Ekkehard Will works fine with 1.5.1, but I'd prefer your version in order to delete empty lines while creating customer adresses. Here's the issue-report from 1.5.1. Since my skills with programing languages are pretty much limited, I have no idea what the report is trying to say.

Note: C:\Program Files\Scribus 1.5.1\share\scripts\ScribusGenerator-master\ScribusGenerator.py is the generator's directory for the later version

C:\Program Files(x86)\Scribus 1.4.6\share\scripts\ScribusGenerator-master\ScribusGenerator.py is he one for the 1.4.6, where it seems to work - but like with the original Ekkehard-Will-Generator, Scribus crashes after fulfilling the operation.

I am using Windows 8.1. Any quick ways to fix the issue quickly?

Cheers
Ryk

Error-report below:

Traceback (most recent call last):
File "", line 10, in
File "C:\Program Files\Scribus 1.5.1\share\scripts\ScribusGenerator-master\ScribusGenerator.py", line 342, in
main_wrapper(sys.argv)
File "C:\Program Files\Scribus 1.5.1\share\scripts\ScribusGenerator-master\ScribusGenerator.py", line 330, in main_wrapper
main(argv)
File "C:\Program Files\Scribus 1.5.1\share\scripts\ScribusGenerator-master\ScribusGenerator.py", line 321, in main
root.mainloop()
File "C:\Program Files\Scribus 1.5.1\python\lib\lib-tk\Tkinter.py", line 1125, in mainloop
self.tk.mainloop(n)
File "C:\Program Files\Scribus 1.5.1\python\lib\lib-tk\Tkinter.py", line 1540, in call
self.widget._report_exception()
File "C:\Program Files\Scribus 1.5.1\python\lib\lib-tk\Tkinter.py", line 1293, in _report_exception
root.report_callback_exception(exc, val, tb)
File "C:\Program Files\Scribus 1.5.1\python\lib\lib-tk\Tkinter.py", line 1895, in report_callback_exception
traceback.print_exception(exc, val, tb)
File "C:\Program Files\Scribus 1.5.1\python\lib\traceback.py", line 125, in print_exception
print_tb(tb, limit, file)
File "C:\Program Files\Scribus 1.5.1\python\lib\traceback.py", line 67, in print_tb
' File "%s", line %d, in %s' % (filename, lineno, name))
File "C:\Program Files\Scribus 1.5.1\python\lib\traceback.py", line 13, in _print
file.write(str+terminator)
IOError: [Errno 9] Bad file descriptor

@berteh
Copy link
Owner

berteh commented Aug 9, 2016

Hello @RykF
The last line of the error message report seems to indicate that ScribusGenerator is unable to write to some file.
Can you please check (and change) the location of the log file, since windows sometimes requires administrator rights to edit files in the Program Files/ subdirectories?

simply edit the logging.conf file and set the location of the log file (scribusGenerator.log by default) to a directory that does not need admin rights to edit in Windows, such as C:\tmp\scribusGenerator.log

Kindly let me know if this fixes your issue.
B.

@berteh
Copy link
Owner

berteh commented Aug 9, 2016

by the way: You'll have to change it for both scripts (in 1.4 and 1.5 directories), since you run different copies.

What do you mean by "Scribus crashes after fulfilling the operation." (in the 1.4) ? is the document generated? do you get any error reported in the scribusGenerator log file?

@berteh
Copy link
Owner

berteh commented Aug 9, 2016

and please use scribus 1.5.2 instead of 1.5.1, it's more stable, has better performances and I'm willing to provide support for it as it's the latest stable release (but not 1.5.1).

@berteh
Copy link
Owner

berteh commented Aug 9, 2016

seems similar to #37

@berteh berteh closed this as completed in 97c2453 Aug 10, 2016
@berteh
Copy link
Owner

berteh commented Aug 10, 2016

found a way to make it work out of the box that does not need you to edit the settings. please update re-download the scribus generator script and net me know if it woks for you.

by the way: you can use the "same" script from your scribus 1.4 and 1.5.2, no need to duplicate it, unless you find it easier for other reasons.

B.

@RykF
Copy link
Author

RykF commented Sep 1, 2016

Well,

turns out that installing Scribus 1.5.2 and putting the Generator in a user's directory made the process work BUT

now I can't name the files with %VAR_name%, etc. If I do that, I get the error message I just put in the appendix of this mail via jpg-file.

Do you have any idea what happened?

Cheers
Ryk

@berteh
Copy link
Owner

berteh commented Sep 1, 2016

Hi RyK.

I did not get the attached screenshot. Can you please try to attach it directly in github, or copy-paste the error text if it's easier.

Using a variable name for the generated fire should definitely work... so let's find a solution for you!

What is your OS? windows?

@RykF
Copy link
Author

RykF commented Sep 2, 2016

I'm sorry I didn't notice that the attachment wasn't there.

Well this is one of the error messages you can't copy the text from.

Thanks for your fast reaction as always :) My WIN OS is 8.1

@berteh
Copy link
Owner

berteh commented Sep 2, 2016

since you can't copy-paste the text could you please upload the image on github, that is supported.

what is the name you want the generated file to have? does the csv field include any special character? are you sure the csv is saved as UTF-8 (that is usually not the case with excel)? has this feature ever worked for you before?

@waseemazam
Copy link

waseemazam commented Sep 6, 2016

I am also having issue with Output File Name (%VAR_name%)

Getting following error

Something went wrong.
Read the log file for more (in your home directory).Traceback(most recent call last):
File”/home/rana/Desktop/new ubuntu/ScribusGenerator.py”, line 151, in buttonokHandler
generator.run()
File”/home/rana/Desktop/new ubuntu/ScribusGeneratorBackend.py”, line 165, in run outputFileName= self.createOutPutFileName(index,self._dataObject.getOutputFileName(), varNamesForFileName,row,fillCount)
File”/home/rana/Desktop/new ubuntu/ScribusGeneratorBackend.py”, line 353. in createOutputFileName
result =
self.replaceVariableWithCsvData(carNames, [row], [outputFileName])
file”/home/rana/Desktop/new ubuntu/ScribusGeneratorBackend.py”, line 398, in
replaceVariableWithCsvData line = line.replace(tmp, cell)
Type Error: expected a string or other character buffer object

I have also opened an issue can be found on the link #60

@berteh
Copy link
Owner

berteh commented Sep 15, 2016

bug #60 is now fixed, you should be able to use %VAR...% in the output file name again. kindly download last version, test and let me know.
B.

@RykF
Copy link
Author

RykF commented Sep 21, 2016

Hello Berteh,

I tried your new version. Nothing worked. This is the log-file. Have a look.

Cheers,
Ryk

2016-09-01 12:54:39 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 12:54:39 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/Operation 1.5.2.csv
2016-09-01 12:54:39 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/Operation 1.5.2.sla
2016-09-01 12:54:39 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 12:54:39 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in %VAR_Vorname%
2016-09-01 12:55:03 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 12:55:03 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/Operation 1.5.2.csv
2016-09-01 12:55:03 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/Operation 1.5.2.sla
2016-09-01 12:55:03 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 12:55:03 - DEBUG - removeEmptyTexts:309 - removed 0 empty ITEXTs
2016-09-01 12:55:03 - INFO - writeSLA:224 - scribus file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/1.sla
2016-09-01 12:55:03 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 12:55:03 - DEBUG - removeEmptyTexts:309 - removed 0 empty ITEXTs
2016-09-01 12:55:03 - INFO - writeSLA:224 - scribus file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/2.sla
2016-09-01 12:55:05 - INFO - run:180 - pdf file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/1.pdf
2016-09-01 12:55:08 - INFO - run:180 - pdf file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Operation 1.5.2/2.pdf

2016-09-01 13:22:21 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 13:22:21 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Stammdaten.csv
2016-09-01 13:22:21 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Standardbrief.sla
2016-09-01 13:22:21 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:22:21 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:22:21 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in %VAR_Interne Laufnummer%-
2016-09-01 13:22:39 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 13:22:39 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Stammdaten.csv
2016-09-01 13:22:39 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Standardbrief.sla
2016-09-01 13:22:39 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:22:39 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in %VAR_Interne Laufnummer%-

2016-09-01 13:23:02 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 13:23:02 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Stammdaten.csv
2016-09-01 13:23:02 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Standardbrief.sla
2016-09-01 13:23:02 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:23:02 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:303 - cleaning 1 empty ITEXT
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:307 - cleaning 1 empty PAGEOBJECT
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:309 - removed 1 empty ITEXTs
2016-09-01 13:23:02 - INFO - writeSLA:224 - scribus file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/1.sla
2016-09-01 13:23:02 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:23:02 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:303 - cleaning 1 empty ITEXT
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:307 - cleaning 1 empty PAGEOBJECT
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:303 - cleaning 1 empty ITEXT
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:307 - cleaning 1 empty PAGEOBJECT
2016-09-01 13:23:02 - DEBUG - removeEmptyTexts:309 - removed 2 empty ITEXTs
2016-09-01 13:23:02 - INFO - writeSLA:224 - scribus file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/2.sla
2016-09-01 13:23:04 - INFO - run:180 - pdf file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/1.pdf
2016-09-01 13:23:05 - INFO - run:180 - pdf file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/2.pdf

2016-09-01 13:32:21 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 13:32:21 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Stammdaten.csv
2016-09-01 13:32:21 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Standardbrief.sla
2016-09-01 13:32:21 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:32:21 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:32:21 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in %VAR_Name%,%VAR_Vorname%

2016-09-01 13:32:29 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 13:32:29 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Stammdaten.csv
2016-09-01 13:32:29 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Standardbrief.sla
2016-09-01 13:32:29 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:32:29 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in %VAR_Name%
2016-09-01 13:32:47 - INFO - init:59 - ScribusGenerator initialized
2016-09-01 13:32:47 - INFO - run:71 - parsing data source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Stammdaten.csv
2016-09-01 13:32:47 - INFO - run:113 - parsing scribus source file C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/Standardbrief.sla
2016-09-01 13:32:47 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:303 - cleaning 1 empty ITEXT
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:307 - cleaning 1 empty PAGEOBJECT
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:309 - removed 1 empty ITEXTs
2016-09-01 13:32:47 - INFO - writeSLA:224 - scribus file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/VAR_Name.sla
2016-09-01 13:32:47 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:303 - cleaning 1 empty ITEXT
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:307 - cleaning 1 empty PAGEOBJECT
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:309 - removed 2 empty ITEXTs
2016-09-01 13:32:47 - INFO - writeSLA:224 - scribus file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/VAR_Name.sla
2016-09-01 13:32:47 - DEBUG - replaceVariablesWithCsvData:387 - replacing VARS_ in <ITEXT CH
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:303 - cleaning 1 empty ITEXT
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:307 - cleaning 1 empty PAGEOBJECT
2016-09-01 13:32:47 - DEBUG - removeEmptyTexts:309 - removed 2 empty ITEXTs
2016-09-01 13:32:47 - INFO - writeSLA:224 - scribus file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/VAR_Name.sla
2016-09-01 13:32:48 - INFO - run:180 - pdf file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/VAR_Name.pdf
2016-09-01 13:32:50 - INFO - run:180 - pdf file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/VAR_Name.pdf
2016-09-01 13:32:51 - INFO - run:180 - pdf file created: C:/Users/Ryk/Dropbox/Asyl AG/Firma/Spendendokumente/Brieftutorial/VAR_Name.pdf

@berteh
Copy link
Owner

berteh commented Sep 21, 2016

strange... but let's figure this out.

What are the columns headers of Stammdaten.csv? are you sure there is a column titled "Name" with a capital N ?
What exact setting do you use in the output file name box, is it %VAR_Name%, or something else?

Could you copy-paste the first 2-3 lines of this CSV file here? or attach it?

@RykF
Copy link
Author

RykF commented Sep 21, 2016

I just sent you "Stammdaten2" which is equivalent to Stammdaten.

I also sent it as an xls, so you can have a look at it - I did this with open office.

I hope this brings you further. You also can experiment with it.

Cya

Ryk

Interne Laufnummer,Tagesnummer,Name,Vorname,Geschlecht,Organisation,Adresszusatz,Strasse,Hausnr,PLZ,Ort,Telefon,E-Mail,Newsletter,Betrag,Turnus,Kontoinhaber,Kreditinstitut,IBAN,BIC,Formular,U-Datum,B-Datum,Erste_Abbuchung,M-Nr_funkt,M-Nr_optisch,Str_Nr,PLZ_Ort,Adresszeile2,Adresszeile3,Adresszeile4,Adresszeile5,Anrede,O-Control-Blank,A-Control-Blank,NL-fail,Kopie
0000001,001,Fechner,Ryk,m,Gesellschaft für sozialen Wandel gUG,c/o Pashalidis,Wilhelmsfelder Straße,121,69118,Heidelberg,0176 24901424,ryk.fechner@fuersozialenwandel.de,nein,200,vierteljährlich,Ryk Fechner,Volksbank Konstanz eG,DE83662910000234535007,GENODE61RAD,PV,01.08.2016,03.08.2016,05.09.2016,1608080301RFHEPV001,16 0808 0301 RFHE PV001,Wilhelmsfelder Straße 121,69118 Heidelberg,Gesellschaft für sozialen Wandel gUG,c/o Pashalidis,Wilhelmsfelder Straße 121,69118 Heidelberg,"Sehr geehrter Herr Fechner,",Gesellschaft für sozialen Wandel gUG,c/o Pashalidis,,Eine Kopie Ihres ausgefüllten Spendenformulars liegt bei.

@berteh
Copy link
Owner

berteh commented Sep 23, 2016

@RykF I did not get the file (attachments don't work by email on github, you need to put them from the issues website), but tested it with the data you copy-pasted, and it works for me using the following settings (see screenshot), me putting there stam-%VAR_Name% or even simply %VAR_Name% in the output file name box... just be careful for the capital/minor characters, as they need to match exactly the headers of your data file.

So to further dig this could you please

  1. delete the file C:\Users\Ryk.scribusGenerator.log
  2. re-download this script from https://github.com/berteh/ScribusGenerator/archive/master.zip, as it seems you're running an old version from the log content.. and try again
  3. copy-paste the content of the whole log file here (including the few first lines)

stam-settings

@berteh berteh reopened this Sep 23, 2016
@berteh
Copy link
Owner

berteh commented Nov 24, 2016

Hi @RykF . Are you still experiencing this problem?
As I could not reproduce it I hope it's fixed... and in that case would like to close the bug report.

@berteh
Copy link
Owner

berteh commented Jan 1, 2017

closing after 1 month of inactivity.
kindly tell me @RykF if this fixed the problem for you. I am still available to help if not.

@berteh berteh closed this as completed Jan 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants