Hello, Aspose Team I use Python’s AsposeCells to generate PNG images from excel files. First off, it works properly with my Python code. But I encountered this issue when I tried to turn my script into an exe file with Pyinstaller. I couldn’t come up with a solution for this. Please assist me!
Python == 3.11.1
aspose-cells==23.1.0
JPype1==1.4.1
The code that generates the exception and the exception are attached here.
image.png (20.0 KB)
image.jpg (75.9 KB)
@Nick.Liu I followed all the Steps but still getting this error
image.png (12.0 KB)
For your information, My versions are:
Python == 3.11.1
aspose-cells==23.1.0
JPype1==1.4.1
@sanoy414,
We are sorry that you still could not figure out your issue. We will evaluate it further and may provide more details on it so you could figure out your issue on your end.
We will get back to you soon.
@sanoy414
Please try the below steps:
Create a folder as c:\app, and copy example.py(attached) to c:\app
Now, open your command prompt, type the below commands in the prompt.
-
cd c:\app
-
pyinstaller example.py
-
copy the jars(aspose-cells-23.1.jar, bcprov-jdk15on-160.jar, bcpkix-jdk15on-1.60.jar, JavaClassBridge.jar. They exist in C:\Python311\Lib\site-packages\asposecells\lib folder) to c:\app
-
edit example.spec to add datas section like below (attached)
mydatas = [(’./aspose-cells-22.11.jar’, ‘.’),
('./bcprov-jdk15on-160.jar', '.'),
('./bcpkix-jdk15on-1.60.jar', '.'),
('./JavaClassBridge.jar', '.') ]
a = Analysis(
['example.py'],
pathex=[],
binaries=[],
datas=mydatas,
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
- pyinstaller example.spec
- cd c:\app\dist\example
- example.exe
I use the same versions of python aspose-cells jpype1 as you.example.zip (1.1 KB)