I have a Python script that asks me to select the input folder. I am running it on OSX.
The issue is that when I try to write the input path it gives me back an error. Let's say that the input folder is "Documents", here what it says:
MBPAdmin:moviep3 Admin$ python merge_videos.py
Enter path to input folder: /Documents
Traceback (most recent call last):
File "merge_videos.py", line 13, in <module>
input_folder = input(input_folder_label)
File "<string>", line 1
/Documents
^
SyntaxError: invalid syntax
Any help please?
Edit: Here's part of the code, if it helps.
from moviepy.editor import VideoFileClip, concatenate_videoclips
import time
import os
import sys
input_folder_label = 'Enter path to input folder: '
output_folder_label = 'Enter path to output folder: '
video_to_be_merged_label = 'Enter path to video that should be merged at the end of each video: '
default_output_folder_name = 'merged_videos' + str(time.time())
input_folder = input(input_folder_label)
input_folder = '/Users/burlicconi/Downloads/filmovi'
try:
assert os.path.exists(input_folder)
except AssertionError as exc:
print("Input folder was not found at {}".format(input_folder))
sys.exit()
print('Input folder exists: {}'.format(input_folder))