79449912

Date: 2025-02-19 00:27:20
Score: 1
Natty:
Report link

I had a similar issue.

INFO: Appending 'datas' from .spec Unable to find 'C:\Users\ ... \RootFolder\export.png' when adding binary and data files.

My code was:

QAction(QIcon(resource_path("AppImages\\Theme\\Dark\\export.png")), "Export Config", self)

resource_path is a function from: https://stackoverflow.com/a/72060275/26503307

Firstly, I tried

pyinstaller --onefile --noconsole --windowed --add-data "export.png:AppImages/Theme/Dark" ... my.py

Then changed to:

--add-data "AppImages/Theme/Dark/export.png:AppImages/Theme/Dark/"

it solved my problem. So I think you need to use the path as it declared in your code. I think it should be something like this (however, I am not sure about regex part (*.json)):

("\venv\Lib\site-packages\branca\*.json", "\venv\Lib\site-packages\branca"),
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Artem Dementiev