-1

from the error 'Unhandled exception in script' I can see that it somehow doesn't recognise module Mindee in my code it's imported as 'from mindee import Client, documents'

I tried --hidden import, but nothing seems to work it's always the same error importing only mindee doesn't work too

Jæcob
  • 11
  • 1

2 Answers2

1

I had the same problem with pikepdf. The solution was to add --copy-metadata pikepdf to the pyinstaller args like so:

pyinstaller --copy-metadata pikepdf main.py

If you have a .spec file you can add the following:

from PyInstaller.utils.hooks import copy_metadata

datas = []
datas += copy_metadata('pikepdf')

# ...

a = Analysis(
    # ...,
    datas=datas,
    # ...,
)

# ...

I hope this helps someone as this question is older.

hanspeters205
  • 381
  • 2
  • 6
0

Something similar happened to me. It seems to look for a version file inside path/main/version folder that doesn't exists (and it doesn't creates either)

Marcos
  • 1