0

I try to create a .exe from a .py script. I use Pyinstaller. The script runs fine with no errors in Pycharm. If I open the .exe my Tkinter opens I can choose the files etc.. And then in the middle of the process it stops at this line:

WARNING: org.esa.s2tbx.dataio.metadata.GenericXmlMetadata: Metadata: the path to element [granuleidentifier] does not exist.

This Warning makes usualy no problem.

Has anybody an idea? I am frustrated with that. I can't find the error.

I worked with the libraries:

import snappy
from snappy import ProductIO
from snappy import GPF
from snappy import jpy
from snappy import HashMap
from Tkinter import *
from tkFileDialog import askopenfilename, asksaveasfile
import numpy
import numpy.ma
from osgeo import gdal, ogr, osr

I can produce a exe from a predecessor project with the libraries and the package cx_freeze in the Osgeo4w shell:

from snappy import ProductIO
from snappy import GPF
from snappy import jpy
from snappy import HashMap
from Tkinter import *
from tkFileDialog import askopenfilename, asksaveasfile

The code was written in pycharm environment wit the python-qgis-ltr-dev.bat as python interpreter located in the bin folder of Osgeo4w. With all libraries i get an error message that the sqlite3.dll file is missing in the Python27 Dlls folder. I placed the missing file into the desired folder and cx_freeze crates an exe which is not opening

If i work with pyinstaller i get an warning that the jvm.dll file can#t be conected- Pyinstaller creates a exe which is opening my GUI i can import all the files the process is starting but then crashing in.

I tried bbfreeze with the same result of missing dll's.

Py2exe created a exe which performs similar to the pyinstaller version. I had two insert two dll's to the python27 dlls folder.

My thoughts are that numpy is not compatible because i get for all trials an message that numpy is not imported.

Is it possible to insert a package in the setup file?

  • 1
    Hard to know what's up without a reproducible example. Are you logging anything in this program? Anything weird in your logs? – Paul H Apr 4 at 22:12
  • What do you mean with logging? I found out that the problem might be the following error message while creating the exe: lib not found: jvm.dll dependency of C:\OSGEO4W\apps\Python27\lib\site-packages\snappy\jpy.pyd. Any Idea how to fix that – RemoteSensing Apr 5 at 9:22
  • Python logging: docs.python.org/3/library/logging.html Any Idea how to fix that? See the first sentence in my comment above – Paul H Apr 5 at 15:18
  • I dont know how to send you my code example here. – RemoteSensing Apr 5 at 19:35
  • Have a read through: stackoverflow.com/help/mcve – Paul H Apr 5 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.