0

i'm uploading a worker to iron worker running Python 3.2 with in the standard environment, using my own http client directly (not the ruby or go cli) according to the REST API. However, despite having a .worker file along with my python script in a zip file and despite successfully uploading my worker, dependencies are not installed prior to the worker execution, so I get an error like that :

Traceback (most recent call last):
  File "/mnt/task/pakt.py", line 3, in <module>
    import requests
ImportError: No module named requests

requests module is declared in my worker file that way :

pip "requests"

How can I fix this ? thanks .

mpm
  • 20,148
  • 7
  • 50
  • 55

1 Answers1

1

You should use the new Docker based workflow, then you can be sure you have the correct dependencies, and that everything is working, before uploading.

https://github.com/iron-io/dockerworker/tree/master/python

Travis Reeder
  • 38,611
  • 12
  • 87
  • 87
  • Allright I decided to switch to PHP for the task as it doesn't require any dependency in that case. But the documentation should be a bit more clear about how the standard environment works for those who want to stick to that until it is deprecated. – mpm Oct 12 '16 at 15:18