Immutable solution version
ImportError: cannot import name 'send_event' from 'haystack.telemetry'
Complete solution
Haystack: Maintainer anakin87 reproduced it and found the cause: farm-haystack (Haystack 1.x) and haystack-ai (Haystack 2.x) installed in the same virtual environment - the two packages are mutually exclusive and the import collides on haystack.telemetry. Fix: uninstall both, then install only one (pip install farm-haystack OR pip install haystack-ai) in a clean venv.
The problem
Issue deepset-ai/haystack#6652 (closed, 25 comments): Describe the bug When I try to import haystack from pipeline from haystack import Pipeline, I get this error. Error message ImportError: cannot import name 'send_event' from 'haystack.telemetry' ([HOME]/... Expected behavior Telemetry should run as expected. To reproduce Make a file with "from haystack import pipelines". Try to run it. ``` File "[HOME]/...", line 1, in [module] from haystack import pipelines File "[HOME]/...
The verified fix
Maintainer anakin87 reproduced it and found the cause: farm-haystack (Haystack 1.x) and haystack-ai (Haystack 2.x) installed in the same virtual environment - the two packages are mutually exclusive and the import collides on haystack.telemetry. Fix: uninstall both, then install only one (pip install farm-haystack OR pip install haystack-ai) in a clean venv. Reporter sutgeorge confirmed: 'Thank you, this solved my issue.'
Evidence
In gh:deepset-ai/haystack#6652 (https://github.com/deepset-ai/haystack/issues/6652), someone reported: Issue deepset-ai/haystack#6652 (closed, 25 comments): Describe the bug When I try to import haystack from pipeline from haystack import Pipeline, I get this error. Error message ImportError: cannot import name 'send_event' from 'haystack.telemetry' ([HOME]/... Expected behavior Telemetry should run as expected. To reproduce Make a file with "from haystack import pipelines". Try to run it. ``` File "[HOME]/...", line 1, in [module] from haystack import pipelines File "[HOME]/... The verified resolution from the thread: Maintainer anakin87 reproduced it and found the cause: farm-haystack (Haystack 1.x) and haystack-ai (Haystack 2.x) installed in the same virtual environment - the two packages are mutually exclusive and the import collides on haystack.telemetry. Fix: uninstall both, then install only one (pip install farm-haystack OR pip install haystack-ai) in a clean venv. Reporter sutgeorge confirmed: 'Thank you, this solved my issue.'
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_i6ikbqTRZGebSA1I0iGDaw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ImportError: cannot import name 'send_event' from 'haystack.telemetry' <span>— Vectle</span></a>