I'm using Google Colab + Python to create a list of folder from a googleSheet of my open projects. I set-up the App in dropbox & the code runs without error. It checks to see if the folder path already exists before creation. Ran the 1st time & received confirmation the folders were created. Ran the 2nd time and it said the folders had already been created - this is expected on a 2nd run. However, the folders are not appearing listed when I log in.
I've checked the path that the path is correct & that i'm navagating to the correct place in dropbox. Is there a reason the api would return the folders are created but not visible? Its been about 25 minutes and they're still not showing - I've heard the API sync can be delayed.
for job_name, job_number in zip(job_names, job_numbers):
folder_name = f"{job_name}{job_number}"
folder_path = f"{parent_folder_path}{folder_name}" # Absolute path to the new folder
print(folder_path)
try:
# Check if the folder already exists
metadata = dbx.files_get_metadata(folder_path)
print(f"Folder '{folder_name}' already exists in Dropbox.")
except dropbox.exceptions.ApiError as err:
# If folder doesn't exist, create it
if err.error.is_path() and err.error.get_path().is_not_found():
try:
dbx.files_create_folder(folder_path)
print(f"Folder '{folder_name}' created in Dropbox.")
except dropbox.exceptions.ApiError as err:
print(f"Failed to create folder '{folder_name}' in Dropbox: {err}")
else:
print(f"Error checking folder '{folder_name}' in Dropbox: {err}")
I'm not a programmer by trade/training or developer - and there's more to the code not shown here...
Is there a limit of the number of errors or attempts? I have run this probably 100 times in the last 24 hours before I got this far.