berteh / ScribusGenerator

Create beautiful documents with data. Open source pdf (and Scribus) template and mail-merge alternative.
http://berteh.github.io/ScribusGenerator/
MIT License
245 stars 37 forks source link

Unable to run ScribusGenerator on Mac OS 10.12.2 #69

Closed donaldgkim closed 7 years ago

donaldgkim commented 7 years ago

Have not been unable to run SG 1.4.6 on Mac OS X. Have tried Python 2.7 and 3.6 with Active Tcl 8.5.18.0. When I run from Script>Scribus Scripts>ScriptsGenerator, the program hangs up with a rotating circle. When I Execute the script directly, same thing. When I run the script via Python Launcher, I receive the following message in terminal:

Traceback (most recent call last): File "/Users/donaldkim/Downloads/ScribusGenerator-master/ScribusGenerator.py", line 29, in import scribus ImportError: No module named scribus Donalds-MacBook-Pro:ScribusGenerator-master donaldkim$

I have attached log files.

Not sure where to go from here.

Thank you.

Log_files.zip

berteh commented 7 years ago

Hello @donaldgkim

I've had previous report of problems to run ScribusGenerator on Mac due to lack of Tkinter in the Python environment. Can you make sure Tkinter is indeed installed if you want to use the graphical interface?

Another option that has been reported successful on Mac is to simply use the command line interface for the Scribus Generator, which has no extra dependencies.

The error you've got seems related to the fact that you try to run the GUI (ScribusGenerator.py) from a python environment where scribus is not configured as a module. From the python launcher you need to run the command line interface (./ScribusGeneratorCLI.py --help), not the GUI... or find a way to add your scribus install to your Python modules path, which I don't know how to do.

Hope this helps. If you can provide any feedback on how to make it work better on Mac it'd be really welcome !

GiovanniBianchessi commented 7 years ago

I have tried to run ScribusGenerator on Scribus 1.5.3 Nightly (Mac OSX is 10.11) and it does not run. I've added some lines in the script to try to find the problem, but without success. [ on the beginning .................] from sys import version_info if version_info.major == 2:

We are using Python 2.x

import Tkinter as tk
print("We are using Python ",version_info)

elif version_info.major == 3:

We are using Python 3.x

import tkinter as tk
print("We are using Python ",version_info)

[.............................] [near the end.........] print(tk.TkVersion) root = tk.Tk() [..............................]

The output is: 'We are using Python ', sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0 Tk version is 8.5 The script hangs on the creation of the window: root = tk.Tk()

So, I think, Tk seems to be installed. I also tried to open a window in the terminal and usign IDLE and in both cases it works.

berteh commented 7 years ago

hello @GiovanniBianchessi

Sorry to hear it does not work for you on Mac. I don't know the internals of Mac and Python well enough to be able to help you. I've had several reports of problems to run this script with its graphical interface on Mac, but the command line interface, on the other hand, works just fine on that OS.

I am taking a loot at PyQt to implement a new interface, but it does not seem to be better supported by Mac. Do you have any recommandations on a good cross platform python GUI toolkit ?

GiovanniBianchessi commented 7 years ago

Hello and thank you for your effort. I have read in Internet that command line version of your great script works well. Actually I am not in hurry to use it. However it seems to me a very good chance to have the graphic interfaced ScribusGenerator running and ready to use. In my opinion the base problem is Python 2.7. It is the past and the past have to be left behind. I think Python 3 is actually better supported. If Scribus could use Python 3.6, things would be simpler. Actually I am not able to persuade Scribus to use Python 3.6. (Is it possible? Maybe not)

I have made a few tries, and I've not been able to use PyQt4 with Python 2.7 in IDLE 2. But running simple examples using PyQt5 and Python 3.6 seem to run well in IDLE 3.

I am not a Python programmer (and I am not good programmer at all) so I cannot suggest you a graphical user interface to switch over, but if you have some simple test script or snippet to try out with Scribus on Mac or simply on Mac, I would be happy to test it for you.

Regards Giovanni Bianchessi

Il giorno 07 mag 2017, alle ore 21:44, Berteh notifications@github.com ha scritto:

hello @GiovanniBianchessi https://github.com/GiovanniBianchessi Sorry to hear it does not work for you on Mac. I don't know the internals of Mac and Python well enough to be able to help you. I've had several reports of problems to run this script with its graphical interface on Mac, but the command line interface https://github.com/berteh/ScribusGenerator/blob/master/README.md#running-scribus-generator-from-the-command-line, on the other hand, works just fine on that OS.

I am taking a loot at PyQt to implement a new interface, but it does not seem to be better supported by Mac. Do you have any recommandations on a good cross platform python GUI toolkit ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/berteh/ScribusGenerator/issues/69#issuecomment-299729606, or mute the thread https://github.com/notifications/unsubscribe-auth/Aa6pJXHmBGI_m8BnL9uTEiOz8cGUbwDoks5r3h86gaJpZM4LqPGx.

berteh commented 7 years ago

Thank you Giovanni. I'll have a look at pyqt5 for a new GUI then... no promises but I'll gladly take upon your test offer if this works out. Berteh.