I'm trying to send a message to Slack using Python and the slack_sdk library, but I'm getting an import error.
from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError
The IDE (VS Code) is underlining both WebClient and SlackApiError with a warning. I've already installed the package using:
pip install slack_sdk
My environment:
Python 3.11
VS Code
slack_sdk version 3.26.1 (installed via pip)
Virtual environment active
I have verified that the package is installed correctly. Why am I getting this warning, and how can I fix it?
Any help would be appreciated!
What I've tried:
- Restarting VS Code
- Reinstalling the package
- Checking spelling and import paths
Ajeet Verma
4,3934 gold badges20 silver badges31 bronze badges
lang-py
/full/path/to/python(ie.print(sys,executable)) and run/full/path/to/python -m pip install .... This problem was in many other questions on Stackoverflow