04-13-2020, 03:15 PM
Hi, thanks for posting this.
I tried this out this weekend and I'm getting an error.
Check-in failed: list indices must be integers, not str
I've had a look around on different forums to see what could cause this but none of the fixes I've seen have resolved this so far.
Here's the the script exactly as I've put it in the script editor.
Am I missing something?
I tried this out this weekend and I'm getting an error.
Check-in failed: list indices must be integers, not str
I've had a look around on different forums to see what could cause this but none of the fixes I've seen have resolved this so far.
Here's the the script exactly as I've put it in the script editor.
Am I missing something?
Code:
#transfer/db_preview
import time
import os
import sys
import shutil
from collections import defaultdict
import distutils.core
files = input['files']
for fl in files:
file_name = files['file_name']
checkin_dir = files['checkin_dir']
relative_dir = files['relative_dir']
checked_in_full_path = u'{0}/{1}'.format(checkin_dir, file_name)
new_location = '/home/tactic/assets/preview'
file_goes_to = u'{0}/{1}/{2}'.format(new_location, relative_dir, file_name)
shutil.copy(checked_in_full_path , file_goes_to)