Forums

File runs without error but wont import as a task.

I have created my first puthon 3.6 file that i can run without error, but when i set it to run as a daily task it gives me an import error in the log. Thanks, from a absolute novice.

Python 3.6 file imports and runs this without error-

import urllib.request

import re

import smtplib

source = urllib.request.urlopen("http://www.blahblahblah

But when run as a daily task it fails and reports this-

Traceback (most recent call last): File "/home/Towels/Dell5.py", line 1, in <module> import urllib.request ImportError: No module named request

2018-02-08 06:07:19 -- Completed task, took 10.00 seconds, return code was 1.

Are you running your scheduled task in Python 3.6? See http://help.pythonanywhere.com/pages/ScheduledTasks/

You, my good sir, have just saved the day!

Those stupid Bi@#%es won't know what's hit them when i stick this on their computers, and its all thanks to you.

Thanks again.