GithubHelp home page GithubHelp logo

Comments (14)

zimeg avatar zimeg commented on June 15, 2024

Hey @Usefultoaster 👋 Does this also happen if you try the following?

import slack_sdk

from python-slack-sdk.

Usefultoaster avatar Usefultoaster commented on June 15, 2024

@zimeg Yes it does, same error.

from python-slack-sdk.

zimeg avatar zimeg commented on June 15, 2024

🤔 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.

zimeg avatar zimeg commented on June 15, 2024

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.

Usefultoaster avatar Usefultoaster commented on June 15, 2024

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.

zimeg avatar zimeg commented on June 15, 2024

How are you installing the packages? There may be something unusual happening between your package environment and editor.

from python-slack-sdk.

Usefultoaster avatar Usefultoaster commented on June 15, 2024
Screenshot 2024-02-20 at 11 25 39 PM

from python-slack-sdk.

zimeg avatar zimeg commented on June 15, 2024

🤔 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.

Usefultoaster avatar Usefultoaster commented on June 15, 2024

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.

zimeg avatar zimeg commented on June 15, 2024

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.

Usefultoaster avatar Usefultoaster commented on June 15, 2024

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.

zimeg avatar zimeg commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.