Hello all,

Still using PyInstaller and trying to find solutions whenever I stumble across a bug.  Right now I have a question: I'm using a library (tortoise-orm) which analyzes code in order to find models.  The code works when Python isn't frozen, but if PyInstaller is asked to freeze it, an error will occur when trying to process the user code:


source = inspect.getsource(cls)


This will raise an OSError.  The source code can't be found, which stands to reason as I believe PyInstaller will only store compiled bytecodes (which might have lost the ability to be analyzed like this).


Does anyone think of a solution?


Ugly fix: remove tortoise from the hiddenimports and add the entire tortoise source code right at the root of my project, to force the executable to use the non-frozen tortoise source code. Dependencies of tortoise will need to be added in the hiddenimports and this is definitely not a great solution, so anything better would be great.


Thanks in advance,


Vincent

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/ed576b32-c0fe-eebb-35a6-6c757efa1fc7%40gmail.com.

Reply via email to