-
|
I have a python program that I converted to exe successfully with cx_freeze. This is a great program and realy appreciate the work that went into this. The program creates a GUI for input and out put using tkinter. It performs a series of calculations and produces calc results and a graph using matlibplot. The program also has two button executed functions; one creates a pdf using fpdf and the other creates a geotiff using rasterio. The program performs all the necessary calculations and can produce a geotiff but when I hit the button to produce the pdf nothing happens. I am using python 3.12, fpdf 1.72 and cx_freeze 7.2.10. Any suggestions would be appreciated. Thanks. The setup file is |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
|
Close discussion and question. Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the reply. I haven't gotten it to work yet .I thought I would do some more trouble shooting. I tried a simple sample fpdf and cx_freeze worked just fine. I have been commenting out large sections of the pdf function and running cx_freeze and attempting to run the exe to see what sections maybe causing the problem. It seems at the moment the problem may be in the header file. Will comment back as I find out more. Thanks!. |
Beta Was this translation helpful? Give feedback.
-
|
It appears that the cx_freeze will create a a functioning exe with fpdf where the pdf text is explicitly defined such as There seems to be a problem with fpdf when you have a function that imports variables and you are printing the variables in the pdf such as (snippet from much larger script) The other function imports variables to create a geotiff and works just fine with the exe it just seems to be a problem with fpdf. Any help would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
I need to go through my pdf function some more. The script produces the pdf with no problem using Anaconda and Spyder IDE. I created an exe using cx_freeze using the simple example below where I was passing number variables to a function using tkinter and button lamda. The resulting exe worked just fine passing the variable to function and creating the pdf with the correct values, Still not sure of problem?? |
Beta Was this translation helpful? Give feedback.
-
|
The problem was I was using an older version of fpdf and was not recognizing the table method. Updated with "pip install fpdf2". Everything works now |
Beta Was this translation helpful? Give feedback.
The problem was I was using an older version of fpdf and was not recognizing the table method. Updated with "pip install fpdf2". Everything works now