Export to .exe file

When i export .py file to .exe, when program start in console i see error open model (i use .gltf) link to my code

Is your model included with your executable? That is, is the model found in the same place relative to your executable as it is in the unexported version?

Another thought: How are you exporting your program to .exe?

Finally, could you post the full error message that you’re seeing?

error:

Known pipe types:
wglGraphicsPipe
(all display modules loaded.)
:loader(error): Extension of file models/).gltf is unrecognized; cannot load.
Currently known scene file types are:
Bam
bam
:loader(error): Couldn't load file models/) gltf: all matching files on model path invalid (the model path is currently:
"/"/c/Code Master/Panda_3d/city/build/win_amd64;/…;/…/models")
Traceback (most recent call last):
File "_main_"
line 21, in <module>
File "
main_",
, line 14, in _init_
File "direct. showbase.Loader", line 298, in loadModel
OSError: Could not load model file(5): ['models/).gltf']

Is your model included with your executable? That is, is the model found in the same place relative to your executable as it is in the unexported version?

Yes

Another thought: How are you exporting your program to .exe?

python setup.py build_apps

from setuptools import setup

setup(
    name="Game_300_IQ",
    options = {
        'build_apps': {
            'include_patterns': [
                '**/*.gltf'
            ],
            'console_apps': {
                'Game_300_IQ': 'main.py',
            },
            'log_append': False,
            'plugins': [
                'pandagl',
                'p3openal_audio',
            ],
            'platforms':['win_amd64']
        }
    }
)

Welcome to the community!

You need to put panda3d-gltf on a new line in your requirements.txt file.

1 Like

It didn’t work

The problem turned out to be that I did not configure the installer for 3.9 during installation

1 Like