os / slacker

Full-featured Python interface for the Slack API
Apache License 2.0
1.6k stars 245 forks source link

ImportError: No module named utils #65

Closed benhorgen closed 8 years ago

benhorgen commented 8 years ago

I've pulled latest and followed the install steps (pip install slacker). I can see everything is installed correctly. But my test script fails with an output message saying it fails to load the utils module.

Here are the details.

Installed via PIP

C:\>c:\Python27\Scripts\pip list
pip (8.1.2)
requests (2.10.0)
setuptools (18.2)
slacker (0.9.16)

Contents of my basic script:

Y:\scripts\>type NewScript.py
from slacker import Slacker
slack = Slacker('xxx-myTokenHere-xxx')
# Send a message to #general channel
slack.chat.post_message('#general', 'Hello fellow slackers!')

When I execute I get the following output:

C:\>c:\Python27\python.exe y:\scripts\iFactrPythonScript\NewScript.py
Traceback (most recent call last):
  File "y:\scripts\NewScript.py", line 1, in <module>
    from slacker import Slacker
  File "/Users/[...maskedusername...]/scripts/slacker.py", line 19, in <module>
ImportError: No module named utils

I get the feeling this is because my script is running on a network drive.

benhorgen commented 8 years ago

Running on the local C: drive did not fix the problem.

It is possible my failure to include from slacker import Slacker at the top of my script was, at least partially, an issue.

os commented 8 years ago

Your script looks good to me. Sorry, I don't have a Windows machine to test it. PYTHONPATH maybe?

os commented 8 years ago

@benhorgen Any progress? Can we close this?

os commented 8 years ago

Closing this as there is no activity.