Comments (14)
Hey @Usefultoaster 👋 Does this also happen if you try the following?
import slack_sdk
from python-slack-sdk.
@zimeg Yes it does, same error.
from python-slack-sdk.
🤔 Did you happen to install slack_sdk
to or activate a virtual environment? I also think the slackclient
package can be removed as part of the migration to slack_sdk
v3, but am not sure if that fix things.
from python-slack-sdk.
There's also a chance that restarting the editor might refresh things. Sometimes the classic off-and-on can work wonders!
from python-slack-sdk.
Hmmm, I had both slack_sdk and slackclient installed. I've tried using the import with both installed, just slackclient installed, and just slack_sdk installed. None of those worked, I have the most recent version of all of these. I've restarted my mac and just vscode multiple times also.
from python-slack-sdk.
How are you installing the packages? There may be something unusual happening between your package environment and editor.
from python-slack-sdk.
from python-slack-sdk.
🤔 Interesting, is both slackclient
and slack_sdk
needed for what you're doing? I believe slack_sdk
is the preferred later version. I'm not sure if restarting the editor after only installing that one might work.
This article might be useful for connecting any virtual environment to the editor too! Please let me know if any of that seems to help
from python-slack-sdk.
I've tried it multiple times with just slack_sdk installed. I made a .env file but cant really use it just yet since import slack isnt working.
from python-slack-sdk.
You might have to activate the virtual environment then install slack_sdk
for things to sync up properly. The following commands might change something:
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install slack_sdk
I'm also curious if you can run your scripts alright, even with the error in the editor, or if this package installation isn't found from the command line either?
from python-slack-sdk.
Activating the virtual environment changed the download of slack a little bit, it actually downloaded each time. After I did that it still doesn't work is vscode. It seems like I can't run the script either.
from python-slack-sdk.
Maybe there's a mismatch of the interpreter being used? Could you check that the virtual environment is selected for your session? It should be something like ./.venv/bin/python
.
If that looks good and you've activated the virtual environment, I'm also curious which python
is being used. In my testing I get something like this:
(.venv) $ which python
/Users/me/path/to/project/.venv/bin/python
The slack_sdk
package is also appearing in my pip list
and .venv/lib/python3.11/site-packages
directory too. But please let me know if any of this seems off since I'm having trouble reproducing the ModuleNotFoundError
myself.
from python-slack-sdk.
Related Issues (20)
- Add rich_text classes to slack_sdk.models module HOT 2
- files_upload() initial_comment isn't formatted (regression) when posting a Slack post HOT 5
- Download file using WebClient HOT 1
- Add MongoDB installation store HOT 2
- Happy Holidays! ❄️ ⏳ The team will be on break from Dec 22nd 2023 to Jan 3rd 2024
- Built-in InstallationStores fail to resolve a valid bot token when both bot and user-only installations co-exist in database tables HOT 2
- block/type/image should allow image_url to reference an uploaded file to Slack without having to make it public HOT 2
- aiohttp based socket_mode failed to reconnect and enter a broken state HOT 6
- Add "slack_file" properties to "image" blocks/elements under slack_sdk.models
- Option to block link url preview HOT 1
- Append `thread_ts` to the payload of a lazy listener in Slash Commands HOT 2
- What is 'Received a response in a non-JSON format' in chat.update HOT 3
- Can't install async (optional) dependencies in 3.26.2 HOT 1
- VSCode (with jedi) can't suggest imports beyond base level of package HOT 5
- [error ] Failed to receive or enqueue a message: TypeError, object of type 'NoneType' has no len() HOT 1
- I am trying to post a message to slack along with a attachment i am getting error as The server responded with: {'ok': False, 'error': 'channel_not_found'} HOT 4
- Unpredictable behaviour using .files_upload_v2 HOT 3
- websocket_client-based SocketModeClient does not reconnect after a DNS outage HOT 1
- client.files_upload_v2 complains about channel not found but client.files_upload works. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-slack-sdk.