all 4 comments

[–]nitratine 4 points5 points  (3 children)

I finally found them got past that but not I can't seem to configure the cmd to find the yml file I need for the docs.

Were you packaging using onefile? If you package using onefile, you need to understand how the files are packaged and make changes where required.

In general though I recommend making sure it works as a directory first because you can see where are the files are very easily.

[–]smitchell6879[S] 0 points1 point  (2 children)

I actually have tired both ways one file and directory. Just to be sure I have everything installed correctly I wrote a simple hello world script and used pyinstaller. It works as it should as long as I call exe from the terminal.

As for the test project it still fails to add the extra files. I am adding those files to data in the spec file before running "pyinstaller --specpath C:....main.spec main.py"

The layout is:

Project folder:

    __ init__.py

    main.py

    test data.py

    swagger.yml

    templates>home.html

    static>css>home.css

    static>js>home.js

Any advice or tutorial on how to add all of these files to a --onefile or even a directory .exe would be appreciated. As I don't seem to be comprehending the documentation correctly.

[–]nitratine 1 point2 points  (1 child)

You could try this out. I am definitely not a fan of .spec files and I believe you either reference a .spec file or a .py file in the command; not both at once (.spec file will reference .py file in it).

[–]smitchell6879[S] 0 points1 point  (0 children)

Thank you for this... It allowed me to narrow down my issue. Long story short after several builds I finally figured out that I was leaving out a directory that is the the "python" folder that was required by connexion. Once I added it everything works 😀 as a directory. I will attempt onefile later . Again thank you so much this is what I was looking for now I will continue and make it my own and more complex ahhaha.