Forums

ImportError: No module krakenex

Hi,

I imported module krakenex throw bash console and when I start script on my own everythink is ok, but when I shedule task it doesnt work. In log: ImportError: No module krakenex.

What happened?

Thanks

Check that you're using the same version of python in both places? eg in your scheduled task, specify "python3.6 /home/me/my_task.py"

Hi Harry. Thanks for your response, I was having the same issue with scheduled tasks. If you google this issue, generally, you get the answer to use a shebang line ('#!/usr/bin/env python3') - which didn't work caused another error in my case.

You might want to consider adding a UI element to scheduled tasks page that reminds the user to add the 'python 3.X' +<space> prefix to the path. To me it's not obvious, and it seems like it's a common enough issue.

There's a help page for general issues that people see with scheduled tasks including shebangs and Python versions: http://help.pythonanywhere.com/pages/ScheduledTasks/