Forums

urllib with paid account

Hi,

I am trying to schedule some code with a call to urllib.request. The project is set with a 3.4 python settings.

When running, either on a schedule basis or in manual mode, the result is : Traceback (most recent call last):

import urllib.request

ImportError: No module named request

So it seems that I am stucked in Python 2.7. How do I fix that ?

Regards.

For a scheduled task, you could run it as python3.4 path-to-my-scripty.py

If you are using a virtualenv, find where the python you are using is by which python from within the virtualenv.

I came accross one of your Q/A and I have used a shebang. It is now ok.

Thx for your help.