Forums

'newline' is an invalid keyword argument for this function

hello i've some problem when im running task with python to get data weathers.. that's running every hour .. but i wonder why my script doesn't work when append file to csv file.. that problem just come only in task sceduler. if im runing in console not yet problem

im ussing ptython 3.6

here is problem i got.

with open(file_of_path, 'a', newline='\n') as file : TypeError: 'newline' is an invalid keyword argument for this function

use the full path for python executable v3.6, it is possible that scheduler is using another $PATH or alike that results in using another python version

yes- that definitely sounds like you are using the wrong python version. See here.