0

I am facing an error when making an executable with pyinstaller.

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\app\\label_printing\\dist\\label_printing\\treepoem\\postscriptbarcode\\barcode.ps'
[6176] Failed to execute script label_printing
Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
  • 2
    What part of the error are you not understanding? The file is not found. We can't help with that, that's a local issue. The only thing is to suggest reading [Windows path in Python](https://stackoverflow.com/questions/2953834/windows-path-in-python) to make sure you are using the path correctly – Tomerikoo Dec 28 '20 at 13:02

2 Answers2

1

Pyinstaller is used to convert .py files to .exe.

You are trying to convert barcode.ps, which is a photoshop file.

Moreover, the error is because this file is not in this location:

C:\app\label_printing\dist\label_printing\treepoem\postscriptbarcode
yourson
  • 88
  • 1
  • 4
  • 18
0

You can add it to the .exe as well with "--add-data" command when executing pyinstaller

pyinstaller --onefile label_printing.py --console --add-data "C:\\barcode.ps;treepoem\\postscriptbarcode"
bjallamo
  • 11
  • 3