flathub / net.scribus.Scribus

https://flathub.org/apps/details/net.scribus.Scribus
5 stars 3 forks source link

Cannot Execute ScribusGenerator #48

Closed overwatcheddude closed 4 months ago

overwatcheddude commented 4 months ago

I am trying to run ScribusGenerator, but I am getting the following error:

'\n\n=================\nAutomatic document generation for Scribus.\n=================\n\nFor further information (manual, description, etc.) please visit:\nhttp://berteh.github.io/ScribusGenerator/\n\n# v3.0 (2022-01-12): port to Python3 for Scribut 1.5.6+, some features (count, fill)\n# v2.0 (2015-12-02): added features (merge, range, clean, save/load)\n# v1.9 (2015-08-03): initial GUI version with PDF generation\n\nThis script is the GUI (TCL-tK) ScribusGenerator\n\n=================\nThe MIT License\n=================\n\nCopyright (c) 2010-2014 Ekkehard Will (www.ekkehardwill.de), 2014-2022 Berteh (https://github.com/berteh/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ModuleNotFoundError: No module named 'ScribusGeneratorBackend'
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ModuleNotFoundError: No module named 'ScribusGeneratorBackend'
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/app/lib/python3.11/site-packages/tkinter/__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
    ^^^^^^^^^^^^^^^
ImportError: /app/lib/python3.11/site-packages/_tkinter.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyObject_CallNoArg
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/app/lib/python3.11/site-packages/tkinter/__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
    ^^^^^^^^^^^^^^^
ImportError: /app/lib/python3.11/site-packages/_tkinter.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyObject_CallNoArg
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/app/lib/python3.11/site-packages/tkinter/__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
    ^^^^^^^^^^^^^^^
ImportError: /app/lib/python3.11/site-packages/_tkinter.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyObject_CallNoArg
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/app/lib/python3.11/site-packages/tkinter/__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
    ^^^^^^^^^^^^^^^
ImportError: /app/lib/python3.11/site-packages/_tkinter.cpython-311-x86_64-linux-gnu.so: undefined symbol: _PyObject_CallNoArg
  File "<console>", line 1
    def getDataSourceFileEntryVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__dataSourceFileEntryVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def dataSourceFileEntryVariableHandler(self):
IndentationError: unexpected indent
  File "<console>", line 1
    result = tkinter.filedialog.askopenfilename(title='Choose...', defaultextension='.csv', filetypes=[(
IndentationError: unexpected indent
  File "<console>", line 1
    'CSV - comma separated values', '*.csv *.CSV'), ('TSV - tab separated values', '*.tsv *.TSV'), ('TXT - text', '*.txt *.TXT'), ('all', '*.*')], initialdir=os.path.dirname(self.__dataSourceFileEntryVariable.get()))
IndentationError: unexpected indent
  File "<console>", line 1
    if result:
IndentationError: unexpected indent
  File "<console>", line 1
    self.__dataSourceFileEntryVariable.set(result)
IndentationError: unexpected indent
  File "<console>", line 1
    def getScribusSourceFileEntryVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__scribusSourceFileEntryVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def scribusSourceFileEntryVariableHandler(self):
IndentationError: unexpected indent
  File "<console>", line 1
    result = tkinter.filedialog.askopenfilename(
IndentationError: unexpected indent
  File "<console>", line 1
    title='Choose...', defaultextension='.sla', filetypes=[('SLA', '*.sla *.SLA')], initialdir=os.path.dirname(self.__scribusSourceFileEntryVariable.get()))
IndentationError: unexpected indent
  File "<console>", line 1
    if result:
IndentationError: unexpected indent
  File "<console>", line 1
    self.__scribusSourceFileEntryVariable.set(result)
IndentationError: unexpected indent
  File "<console>", line 1
    def getDataSeparatorEntryVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__dataSeparatorEntryVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getDataEncodingEntryVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__dataEncodingEntryVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getOutputDirectoryEntryVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__outputDirectoryEntryVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def outputDirectoryEntryVariableHandler(self):
IndentationError: unexpected indent
  File "<console>", line 1
    result = tkinter.filedialog.askdirectory(initialdir=self.__outputDirectoryEntryVariable.get())
IndentationError: unexpected indent
  File "<console>", line 1
    if result:
IndentationError: unexpected indent
  File "<console>", line 1
    self.__outputDirectoryEntryVariable.set(result)
IndentationError: unexpected indent
  File "<console>", line 1
    def getOutputFileNameEntryVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__outputFileNameEntryVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getOutputFormatList(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__outputFormatList
IndentationError: unexpected indent
  File "<console>", line 1
    def getSelectedOutputFormat(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__selectedOutputFormat
IndentationError: unexpected indent
  File "<console>", line 1
    def getKeepGeneratedScribusFilesCheckboxVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__keepGeneratedScribusFilesCheckboxVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getMergeOutputCheckboxVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__mergeOutputCheckboxVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getSaveCheckboxVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__saveCheckboxVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getFromVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__fromVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getToVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__toVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def getCloseDialogVariable(self):
IndentationError: unexpected indent
  File "<console>", line 1
    return self.__closeDialogVariable
IndentationError: unexpected indent
  File "<console>", line 1
    def allValuesSet(self):
IndentationError: unexpected indent
  File "<console>", line 1
    result = 0
IndentationError: unexpected indent
  File "<console>", line 1
    if((self.__scribusSourceFileEntryVariable.get() != CONST.EMPTY) and
IndentationError: unexpected indent
  File "<console>", line 1
    (self.__dataSourceFileEntryVariable.get() != CONST.EMPTY) and
IndentationError: unexpected indent
  File "<console>", line 1
    (self.__outputDirectoryEntryVariable.get() != CONST.EMPTY) and
IndentationError: unexpected indent
  File "<console>", line 1
    (len(self.__dataEncodingEntryVariable.get()) >= 4 ) and
IndentationError: unexpected indent
  File "<console>", line 1
    (len(self.__dataSeparatorEntryVariable.get()) == 1)):
IndentationError: unexpected indent
  File "<console>", line 1
    result = 1
IndentationError: unexpected indent
  File "<console>", line 1
    return result
IndentationError: unexpected indent
  File "<console>", line 1
    def createGeneratorDataObject(self):
IndentationError: unexpected indent
  File "<console>", line 1
    result = GeneratorDataObject(
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFile=self.__scribusSourceFileEntryVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    dataSourceFile=self.__dataSourceFileEntryVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    outputDirectory=self.__outputDirectoryEntryVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    outputFileName=self.__outputFileNameEntryVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    outputFormat=self.__selectedOutputFormat.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    keepGeneratedScribusFiles=self.__keepGeneratedScribusFilesCheckboxVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    csvSeparator=self.__dataSeparatorEntryVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    csvEncoding=self.__dataEncodingEntryVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    singleOutput=self.__mergeOutputCheckboxVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    firstRow=self.__fromVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    lastRow=self.__toVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    saveSettings=self.__saveCheckboxVariable.get(),
IndentationError: unexpected indent
  File "<console>", line 1
    closeDialog=self.__closeDialogVariable.get()
IndentationError: unexpected indent
  File "<console>", line 1
    )
IndentationError: unexpected indent
  File "<console>", line 1
    return result
IndentationError: unexpected indent
  File "<console>", line 1
    def buttonCancelHandler(self):
IndentationError: unexpected indent
  File "<console>", line 1
    self.__root.destroy()
IndentationError: unexpected indent
  File "<console>", line 1
    def buttonOkHandler(self):
IndentationError: unexpected indent
  File "<console>", line 1
    if (CONST.TRUE == self.allValuesSet()):
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject = self.createGeneratorDataObject()
IndentationError: unexpected indent
  File "<console>", line 1
    generator = ScribusGenerator(dataObject)
IndentationError: unexpected indent
  File "<console>", line 1
    try:
IndentationError: unexpected indent
  File "<console>", line 1
    generator.run()
IndentationError: unexpected indent
  File "<console>", line 1
    if(dataObject.getCloseDialog()):
IndentationError: unexpected indent
  File "<console>", line 1
    self.__root.destroy()
IndentationError: unexpected indent
  File "<console>", line 1
    else:
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showinfo(
IndentationError: unexpected indent
  File "<console>", line 1
    'Scribus Generator', message='Done. Generated files are in '+dataObject.getOutputDirectory())
IndentationError: unexpected indent
  File "<console>", line 1
    except IOError as e:  # except FileNotFoundError as e:
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showerror(
IndentationError: unexpected indent
  File "<console>", line 1
    title='File Not Found', message="Could not find some input file, please verify your Scribus and Data file settings:\n\n %s" % e)
IndentationError: unexpected indent
  File "<console>", line 1
    except ValueError as e:
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showerror(
IndentationError: unexpected indent
  File "<console>", line 1
    title='Variable Error', message="Could likely not replace a variable with its value,\nplease check your Data File and Data Separator settings:\n\n %s" % e)
IndentationError: unexpected indent
  File "<console>", line 1
    except IndexError as e:
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showerror(
IndentationError: unexpected indent
  File "<console>", line 1
    title='Variable Error', message="Could not find the value for one variable.\nplease check your Data File and Data Separator settings.\n\n %s" % e)
IndentationError: unexpected indent
  File "<console>", line 1
    except Exception:
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showerror(title='Error Scribus Generator',
IndentationError: unexpected indent
  File "<console>", line 1
    message="Something went wrong.\n\nRead the log file for more (in your home directory)."+traceback.format_exc())
IndentationError: unexpected indent
  File "<console>", line 1
    else:
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showerror(
IndentationError: unexpected indent
  File "<console>", line 1
    title='Validation failed', message='Please check if all settings have been set correctly!')
IndentationError: unexpected indent
  File "<console>", line 1
    def scribusLoadSettingsHandler(self):
IndentationError: unexpected indent
  File "<console>", line 1
    slaFile = self.__scribusSourceFileEntryVariable.get()
IndentationError: unexpected indent
  File "<console>", line 1
    if(slaFile is CONST.EMPTY):
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showinfo(
IndentationError: unexpected indent
  File "<console>", line 1
    'Choose a file', message="Set a valid scribus input file prior to loading its settings.")
IndentationError: unexpected indent
  File "<console>", line 1
    return
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject = GeneratorDataObject(
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFile=slaFile
IndentationError: unexpected indent
  File "<console>", line 1
    )
IndentationError: unexpected indent
  File "<console>", line 1
    generator = ScribusGenerator(dataObject)
IndentationError: unexpected indent
  File "<console>", line 1
    saved = generator.get_saved_settings()
IndentationError: unexpected indent
  File "<console>", line 1
    if (saved):
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject.loadFromString(saved)
IndentationError: unexpected indent
  File "<console>", line 1
    self.__dataSourceFileEntryVariable.set(
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject.getDataSourceFile())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__dataSeparatorEntryVariable.set(dataObject.getCsvSeparator())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__dataEncodingEntryVariable.set(dataObject.getCsvEncoding())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__outputDirectoryEntryVariable.set(
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject.getOutputDirectory())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__outputFileNameEntryVariable.set(
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject.getOutputFileName())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__selectedOutputFormat.set(dataObject.getOutputFormat())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__keepGeneratedScribusFilesCheckboxVariable.set(
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject.getKeepGeneratedScribusFiles())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__mergeOutputCheckboxVariable.set(
IndentationError: unexpected indent
  File "<console>", line 1
    dataObject.getSingleOutput())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__fromVariable.set(dataObject.getFirstRow())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__toVariable.set(dataObject.getLastRow())
IndentationError: unexpected indent
  File "<console>", line 1
    self.__closeDialogVariable.set(dataObject.getCloseDialog())
IndentationError: unexpected indent
  File "<console>", line 1
    else:
IndentationError: unexpected indent
  File "<console>", line 1
    tkinter.messagebox.showinfo(
IndentationError: unexpected indent
  File "<console>", line 1
    'No Settings', message="Input scribus file contains no former saved settings.")
IndentationError: unexpected indent
  File "<console>", line 1
    def show(self):
IndentationError: unexpected indent
  File "<console>", line 1
    self.__root.title(CONST.APP_NAME)
IndentationError: unexpected indent
  File "<console>", line 1
    mainFrame = Frame(self.__root)
IndentationError: unexpected indent
  File "<console>", line 1
    top = mainFrame.winfo_toplevel()
IndentationError: unexpected indent
  File "<console>", line 1
    top.rowconfigure(0, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    top.columnconfigure(0, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    mainFrame.rowconfigure(0, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    mainFrame.columnconfigure(0, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    mainFrame.grid(sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame = LabelFrame(mainFrame, text='Input Settings')
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame.columnconfigure(2, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame.grid(column=0, row=0, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame = LabelFrame(mainFrame, text='Output Settings')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame.columnconfigure(2, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame.grid(column=0, row=1, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    miscFrame = LabelFrame(mainFrame, text='Misc Settings')
IndentationError: unexpected indent
  File "<console>", line 1
    miscFrame.columnconfigure(2, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    miscFrame.grid(column=0, row=2, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    buttonFrame = Frame(mainFrame)
IndentationError: unexpected indent
  File "<console>", line 1
    buttonFrame.columnconfigure(3, weight=1)
IndentationError: unexpected indent
  File "<console>", line 1
    buttonFrame.grid(column=0, row=3, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFileLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='Scribus File:', width=15, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFileLabel.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=0, row=0, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFileEntry = Entry(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, textvariable=self.__ctrl.getScribusSourceFileEntryVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFileEntry.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=1, columnspan=3, row=0, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFileButton = Button(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='⏏', command=self.__ctrl.scribusSourceFileEntryVariableHandler)
IndentationError: unexpected indent
  File "<console>", line 1
    scribusSourceFileButton.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=4, row=0, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    scribusLoadSettingsButton = Button(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='↺', command=self.__ctrl.scribusLoadSettingsHandler)  # ⟲ ⟳ ↻ ↺ ⌂ ⌘ ⎗
IndentationError: unexpected indent
  File "<console>", line 1
    scribusLoadSettingsButton.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=5, row=0, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    dataSourceFileLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='Data File:', width=15, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    dataSourceFileLabel.grid(column=0, row=1, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    dataSourceFileEntry = Entry(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, textvariable=self.__ctrl.getDataSourceFileEntryVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    dataSourceFileEntry.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=1, columnspan=4, row=1, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    dataSourceFileButton = Button(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='⏏', command=self.__ctrl.dataSourceFileEntryVariableHandler)
IndentationError: unexpected indent
  File "<console>", line 1
    dataSourceFileButton.grid(column=5, row=1, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    dataSeparatorLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='Data Field Separator:', width=15, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    dataSeparatorLabel.grid(column=0, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    dataSeparatorEntry = Entry(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, width=3, textvariable=self.__ctrl.getDataSeparatorEntryVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    dataSeparatorEntry.grid(column=1, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    dataEncodingLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='Data Encoding:', width=15, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    dataEncodingLabel.grid(column=0, row=3, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    dataEncodingEntry = Entry(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, width=15, textvariable=self.__ctrl.getDataEncodingEntryVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    dataEncodingEntry.grid(column=1, row=3, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    fromLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    inputFrame, text='(opt.) use partial data, only from:', anchor='e')
IndentationError: unexpected indent
  File "<console>", line 1
    fromLabel.grid(column=2, row=2, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    fromEntry = Entry(inputFrame, width=3,
IndentationError: unexpected indent
  File "<console>", line 1
    textvariable=self.__ctrl.getFromVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    fromEntry.grid(column=3, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    toLabel = Label(inputFrame, text='to:', width=3, anchor='e')
IndentationError: unexpected indent
  File "<console>", line 1
    toLabel.grid(column=4, row=2, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    toEntry = Entry(inputFrame, width=3,
IndentationError: unexpected indent
  File "<console>", line 1
    textvariable=self.__ctrl.getToVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    toEntry.grid(column=5, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    outputDirectoryLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, text='Output Directory:', width=15, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    outputDirectoryLabel.grid(column=0, row=0, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    outputDirectoryEntry = Entry(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, textvariable=self.__ctrl.getOutputDirectoryEntryVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    outputDirectoryEntry.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=1, columnspan=4, row=0, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    outputDirectoryButton = Button(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, text='⏏', command=self.__ctrl.outputDirectoryEntryVariableHandler)
IndentationError: unexpected indent
  File "<console>", line 1
    outputDirectoryButton.grid(column=5, row=0, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFileNameLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, text='Output File Name:', width=15, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFileNameLabel.grid(column=0, row=1, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFileNameEntry = Entry(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, textvariable=self.__ctrl.getOutputFileNameEntryVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    outputFileNameEntry.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=1, columnspan=3, row=1, padx=5, pady=5, sticky='ew')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFormatLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, text='Format:', anchor='e')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFormatLabel.grid(column=4, row=1, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    outputFormatListBox = OptionMenu(outputFrame, self.__ctrl.getSelectedOutputFormat(), *self.__ctrl.getOutputFormatList(),
IndentationError: unexpected indent
  File "<console>", line 1
    command=lambda v=self.__ctrl.getSelectedOutputFormat(): self.updateState(v))
IndentationError: unexpected indent
  File "<console>", line 1
    outputFormatListBox.grid(column=5, row=1, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    mergeOutputLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, text='Merge in Single File:', width=17, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    mergeOutputLabel.grid(column=0,  columnspan=2, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    mergeOutputCheckbox = Checkbutton(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, variable=self.__ctrl.getMergeOutputCheckboxVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    mergeOutputCheckbox.grid(column=2, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesLabel = Label(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, text='Keep Scribus Files:', width=15, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesLabel.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=3, columnspan=2, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesCheckbox = Checkbutton(
IndentationError: unexpected indent
  File "<console>", line 1
    outputFrame, variable=self.__ctrl.getKeepGeneratedScribusFilesCheckboxVariable(), anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesCheckbox.grid(
IndentationError: unexpected indent
  File "<console>", line 1
    column=5, row=2, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    saveLabel = Label(miscFrame, text='Save Settings:',
IndentationError: unexpected indent
  File "<console>", line 1
    width=12, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    saveLabel.grid(column=0, row=1, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    saveCheckbox = Checkbutton(
IndentationError: unexpected indent
  File "<console>", line 1
    miscFrame, variable=self.__ctrl.getSaveCheckboxVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    saveCheckbox.grid(column=1, row=1, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    closeLabel = Label(miscFrame, text='Close dialog on success:',
IndentationError: unexpected indent
  File "<console>", line 1
    width=20, anchor='w')
IndentationError: unexpected indent
  File "<console>", line 1
    closeLabel.grid(column=3, columnspan=2, row=1, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    closeCheckbox = Checkbutton(
IndentationError: unexpected indent
  File "<console>", line 1
    miscFrame, variable=self.__ctrl.getCloseDialogVariable())
IndentationError: unexpected indent
  File "<console>", line 1
    closeCheckbox.grid(column=5, row=1, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    generateButton = Button(
IndentationError: unexpected indent
  File "<console>", line 1
    buttonFrame, text='✔\nGenerate', width=10, command=self.__ctrl.buttonOkHandler)
IndentationError: unexpected indent
  File "<console>", line 1
    generateButton.grid(column=0, row=0, padx=5, pady=5, sticky='w')
IndentationError: unexpected indent
  File "<console>", line 1
    cancelButton = Button(buttonFrame, text='✘\nCancel',
IndentationError: unexpected indent
  File "<console>", line 1
    width=10, command=self.__ctrl.buttonCancelHandler)
IndentationError: unexpected indent
  File "<console>", line 1
    cancelButton.grid(column=1, row=0, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    helpButton = Button(buttonFrame, text='❓\nHelp',
IndentationError: unexpected indent
  File "<console>", line 1
    width=7, command = lambda: webbrowser.open("https://github.com/berteh/ScribusGenerator/#how-to-use-scribus-generator"))
IndentationError: unexpected indent
  File "<console>", line 1
    helpButton.grid(column=3, row=0, padx=5, pady=5, sticky='e')
IndentationError: unexpected indent
  File "<console>", line 1
    mainFrame.grid()
IndentationError: unexpected indent
  File "<console>", line 1
    self.__root.grid()
IndentationError: unexpected indent
  File "<console>", line 1
    def updateState(self, value):
IndentationError: unexpected indent
  File "<console>", line 1
    if(value == CONST.FORMAT_PDF):
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesLabel.configure(state=NORMAL)
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesCheckbox.configure(state=NORMAL)
IndentationError: unexpected indent
  File "<console>", line 1
    else:
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesLabel.configure(state=DISABLED)
IndentationError: unexpected indent
  File "<console>", line 1
    self.keepGeneratedScribusFilesCheckbox.configure(state=DISABLED)
IndentationError: unexpected indent
Traceback (most recent call last):
  File "<console>", line 2, in <module>
  File "<console>", line 5, in main_wrapper
NameError: name 'CONST' is not defined

The ScribusGenerator works as expected when using the native packages of Scribus and ScribusGenerator on Fedora 39.

overwatcheddude commented 4 months ago

I placed ScribusGenerator.py, ScribusGeneratorBackend.py and ScribusGeneratorCLI.py in /var/lib/flatpak/app/net.scribus.Scribus/x86_64/stable/639490ea1115a2b383855f76007a79988da5f2a96e8641930d7182ecd3149d9a/files/share/scribus/scripts/, and tried to execute ScribusGenerator.py, but unfortunately it did not resolve the issue. I got the same error message as above.

overwatcheddude commented 4 months ago

I ran a simple Python script:

try:
  import tkinter as tk
  print("tkinter is available")
except ImportError:
  print("tkinter is not available")

Output: tkinter is not available

It seems that ScribusGenerator.py cannot use the tkinter module that comes with the flatpak. Even the default scripts that come with Scribus installation do not work due to this issue. Is there a better way to include tkinter in the flatpak?

hfiguiere commented 4 months ago

I placed ScribusGenerator.py, ScribusGeneratorBackend.py and ScribusGeneratorCLI.py in /var/lib/flatpak/app/net.scribus.Scribus/x86_64/stable/639490ea1115a2b383855f76007a79988da5f2a96e8641930d7182ecd3149d9a/files/share/scribus/scripts/, and tried to execute ScribusGenerator.py, but unfortunately it did not resolve the issue. I got the same error message as above.

Never do that. No user is supposed to ever copy anything in that location.

hfiguiere commented 4 months ago

tkinter has been updated in the package, it was broken with Python 3.11