Forums

Error running scheduled task in Python 2.7

I have a script in Python 2.7

The first line is this, it runs fine just from file tab.

#!/usr/bin/env python2.7

enter image description here

But I get an error if I run it as a scheduled task:

enter image description here

What do I need to do? Thanks!

I think that's a bug in our scheduled task "hashbang"-detection code. Try using

#!/usr/bin/python2.7

...instead.

That works perfect, thanks!

Thanks for confirming! I've made a note of the bug, we'll get it fixed.