You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
virtualenv shovel-test
cd shovel-test
source bin/activate
git clone https://github.com/seomoz/shovel.git
cd shovel
python setup.py install
cd ../
mkdir sandbox
cd sandbox
ln -sf ../shovel/shovel.py .
shovel help
Output:
Traceback (most recent call last):
File "/home/npinto/.local/bin/shovel", line 41, in <module>
import shovel
File "/home/npinto/tmp/shovel-test/sandbox/shovel.py", line 1, in <module>
from shovel import task
ImportError: cannot import name task
[1] 31729 exit 1 shovel help
The text was updated successfully, but these errors were encountered:
Just saw this myself. In some cases the python interpreter appears to be looking for task from within your shovel.py itself, rather than looking for the global shovel module.
You can resolve this by creating a shovel directory and moving your shovel.py into it:
mkdir shovel
mv shovel.py
shovel <your_task> # should work now
In hindsight, it was probably not a good idea to have the module named the same as where it tries to load tasks, but @cory-klein -- that is the best work-around.
Steps to reproduce:
Output:
The text was updated successfully, but these errors were encountered: