ambitious-aqua
ambitious-aqua•2w ago

Problems with the Python SDK: No module named 'pysher'

I created a Python virtual environment using venv and did a simple initialization as follows:
from composio_crewai import ComposioToolSet, Action

composio_client = ComposioToolSet()
serpapi_tool = composio_client.get_tools(actions=[Action.SERPAPI_SEARCH])
from composio_crewai import ComposioToolSet, Action

composio_client = ComposioToolSet()
serpapi_tool = composio_client.get_tools(actions=[Action.SERPAPI_SEARCH])
But I get the following error:
ModuleNotFoundError: No module named 'pysher'

Traceback:
File "C:\Users\xxxxx\my-venv\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "C:\Users\xxxxx\my-venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 590, in code_to_exec
exec(code, module.__dict__)
File "C:\Users\xxxxx\pages\2_Analyzer_Page.py", line 2, in <module>
from composio_crewai import ComposioToolSet, Action
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio_crewai\__init__.py", line 1, in <module>
from composio import WorkspaceType
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio\__init__.py", line 22, in <module>
from composio.client import Composio # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio\client\__init__.py", line 15, in <module>
from composio.client.collections import (
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio\client\collections.py", line 15, in <module>
import pysher
ModuleNotFoundError: No module named 'pysher'

Traceback:
File "C:\Users\xxxxx\my-venv\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "C:\Users\xxxxx\my-venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 590, in code_to_exec
exec(code, module.__dict__)
File "C:\Users\xxxxx\pages\2_Analyzer_Page.py", line 2, in <module>
from composio_crewai import ComposioToolSet, Action
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio_crewai\__init__.py", line 1, in <module>
from composio import WorkspaceType
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio\__init__.py", line 22, in <module>
from composio.client import Composio # noqa: E402
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio\client\__init__.py", line 15, in <module>
from composio.client.collections import (
File "C:\Users\xxxxx\my-venv\Lib\site-packages\composio\client\collections.py", line 15, in <module>
import pysher
10 Replies
like-gold
like-gold•2w ago
What python and composio-core versions are you using??
ambitious-aqua
ambitious-aqua•2w ago
@thatsmeadarsh Python 3.11.8 Composio Core 0.5.15
like-gold
like-gold•2w ago
I think something else is wrong, if you don't mind can we have a short google meet regarding this issue?? Let me know when you are free (mentioning your timezone) 🙌
ambitious-aqua
ambitious-aqua•2w ago
@thatsmeadarsh Sure! I can do it whenever in the next 10 hours. It's 10:41 am in my timezone (CEST, UTC+2). @Soham I think I'm using the correct Python interpreter (the venv one).
wise-white
wise-white•2w ago
@xaxbxc_ Is this full error stack? I think the one you uploaded might be missing some lines.
ambitious-aqua
ambitious-aqua•2w ago
@kaavee I edited the first message.
wise-white
wise-white•2w ago
Super weird, the module is in our deps, should have been installed. Could you run pip install pysher==1.0.8 and try once?
ambitious-aqua
ambitious-aqua•2w ago
@kaavee I know. I already tried this. It says that requirement is already satisfied. I'm going nuts trying to solve it. I also checked this by running pip list and I can see Pysher 1.0.8 being installed in my venv. However, I get this error saying that the module named pysher cannot be found.
wise-white
wise-white•2w ago
Want to get on a quick call? https://meet.google.com/kga-cezc-zjc
ambitious-aqua
ambitious-aqua•2w ago
Yes! For anyone reading this, the error was solved with the help of @kaavee. The issue was that pip show pysher was showing like Pysher is installed inside the venv, but actually it wasn't by looking at the folder site-packages where the package should be located. The solution is running the following command and installing Pysher this way: pip install git+https://github.com/nlsdfnbch/Pysher.git