Closed rokm closed 7 months ago
Hi guys, I have a persisting issue with the latest version of pyinstaller and opentelemetry, I developed a local AI app that runs perfectly on python but once I created its exe it keeps sending the same errors while executing:
Traceback (most recent call last): File "langchain_community\vectorstores\chroma.py", line 81, in init File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "chromadbinit.py", line 5, in File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "chromadb\auth\tokeninit.py", line 26, in File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "chromadb\telemetry\opentelemetryinit.py", line 6, in File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module File "opentelemetry\sdk\resourcesinit.py", line 144, in File "importlib_metadatainit.py", line 900, in version File "importlib_metadatainit.py", line 873, in distribution File "importlib_metadatainit.py", line 391, in from_name importlib_metadata.PackageNotFoundError: No package metadata was found for opentelemetry-sdk
Could anyone help me if possible? Thank you!
What version of pyinstaller-hooks-contrib
do you have installed?
What version of
pyinstaller-hooks-contrib
do you have installed?
I have the 6.6.0 of pyinstaller and just re-installed pyinstaller-hooks-contrib yesterday again.
What version of
pyinstaller-hooks-contrib
do you have installed?I have the 6.6.0 of pyinstaller and just re-installed pyinstaller-hooks-contrib yesterday again.
If you have pyinstaller-hooks-contrib
2024.5
, then the hook that was added in this PR should do the trick (the opentelemetry-sdk
metadata should be collected as part of the entry points that the hook collect).
But even so, you can force collection of that metadata by adding --copy-metadata opentelemetry-sdk
to your PyInstaller command, and see if it gets you any further.
What version of
pyinstaller-hooks-contrib
do you have installed?I have the 6.6.0 of pyinstaller and just re-installed pyinstaller-hooks-contrib yesterday again.
If you have
pyinstaller-hooks-contrib
2024.5
, then the hook that was added in this PR should do the trick (theopentelemetry-sdk
metadata should be collected as part of the entry points that the hook collect).But even so, you can force collection of that metadata by adding
--copy-metadata opentelemetry-sdk
to your PyInstaller command, and see if it gets you any further.
I forced the add but the issue persists, I already have the 2024.5 version. I will try to redo the whole thing from scratch and see if the issue is still there. Thank you
What version of
pyinstaller-hooks-contrib
do you have installed?I have the 6.6.0 of pyinstaller and just re-installed pyinstaller-hooks-contrib yesterday again.
If you have
pyinstaller-hooks-contrib
2024.5
, then the hook that was added in this PR should do the trick (theopentelemetry-sdk
metadata should be collected as part of the entry points that the hook collect). But even so, you can force collection of that metadata by adding--copy-metadata opentelemetry-sdk
to your PyInstaller command, and see if it gets you any further.I forced the add but the issue persists, I already have the 2024.5 version. I will try to redo the whole thing from scratch and see if the issue is still there. Thank you
Try rebuilding with --clean
option added, then.
What version of
pyinstaller-hooks-contrib
do you have installed?I have the 6.6.0 of pyinstaller and just re-installed pyinstaller-hooks-contrib yesterday again.
If you have
pyinstaller-hooks-contrib
2024.5
, then the hook that was added in this PR should do the trick (theopentelemetry-sdk
metadata should be collected as part of the entry points that the hook collect). But even so, you can force collection of that metadata by adding--copy-metadata opentelemetry-sdk
to your PyInstaller command, and see if it gets you any further.I forced the add but the issue persists, I already have the 2024.5 version. I will try to redo the whole thing from scratch and see if the issue is still there. Thank you
Try rebuilding with
--clean
option added, then.
I did use clean but separately, would you be kind to give me a sequence to follow in order to build my exe correctly. Thank you in advance!!
What version of
pyinstaller-hooks-contrib
do you have installed?I have the 6.6.0 of pyinstaller and just re-installed pyinstaller-hooks-contrib yesterday again.
If you have
pyinstaller-hooks-contrib
2024.5
, then the hook that was added in this PR should do the trick (theopentelemetry-sdk
metadata should be collected as part of the entry points that the hook collect). But even so, you can force collection of that metadata by adding--copy-metadata opentelemetry-sdk
to your PyInstaller command, and see if it gets you any further.I forced the add but the issue persists, I already have the 2024.5 version. I will try to redo the whole thing from scratch and see if the issue is still there. Thank you
Try rebuilding with
--clean
option added, then.I did use clean but separately, would you be kind to give me a sequence to follow in order to build my exe correctly. Thank you in advance!!
Run pyinstaller --clean --copy-metadata opentelemetry-sdk [the rest of your options]
; then copy full build log and the error message here (or in a new issue).
What version of
pyinstaller-hooks-contrib
do you have installed?I have the 6.6.0 of pyinstaller and just re-installed pyinstaller-hooks-contrib yesterday again.
If you have
pyinstaller-hooks-contrib
2024.5
, then the hook that was added in this PR should do the trick (theopentelemetry-sdk
metadata should be collected as part of the entry points that the hook collect). But even so, you can force collection of that metadata by adding--copy-metadata opentelemetry-sdk
to your PyInstaller command, and see if it gets you any further.I forced the add but the issue persists, I already have the 2024.5 version. I will try to redo the whole thing from scratch and see if the issue is still there. Thank you
Try rebuilding with
--clean
option added, then.I did use clean but separately, would you be kind to give me a sequence to follow in order to build my exe correctly. Thank you in advance!!
Run
pyinstaller --clean --copy-metadata opentelemetry-sdk [the rest of your options]
; then copy full build log and the error message here (or in a new issue).
So that issue is resolved but I keep getting issues with not found modules like: ModuleNotFoundError: No module named 'pypika' ModuleNotFoundError: No module named 'chromadb.telemetry.product.posthog' etc so I think that the issue is that it seems like the packages are not accessible.
There's a lot of indirect imports going on in chromadb
, so you will need to specify those missing modules as hidden imports.
Add hook for
opentelemetry
that collects all entry-points withopentelemetry_
prefix.Closes pyinstaller/pyinstaller#8413.