f = drive.CreateFile({"parents": [{"kind": "linktodrive", "id": fid}]})
f.SetContentFile('traffic_measurement'+str(y)+'.csv')
f1 = drive.CreateFile({"parents": [{"kind": "linktodrive", "id": fid}]})
f1.SetContentFile('speed_violation'+str(y)+'.csv')
f2 = drive.CreateFile({"parents": [{"kind": "linktodrive", "id": fid}]})
f2.SetContentFile('detected_vehicles'+str(y))
f3 = drive.CreateFile({"parents": [{"kind": "linktodrive", "id": fid}]})
f3.SetContentFile('speed_violation'+str(y))
f.Upload()
f1.Upload()
f2.Upload()
f3.Upload()
The file are successfully uploaded and I then to tried to upload folder which shows the following error.
self.content = open(filename, 'rb')
PermissionError: [Errno 13] Permission denied: 'detected_vehicles2019-10-18