文件上载 服务器错误,在dropbox python api中使用“文件”上载文件时发生内部服务器错误...

我正在尝试使用python dropbox中的files_upload方法将本地csv文件上载到dropbox帐户api。它引发内部服务器错误。以前,它是有效的好吧。下面是我的密码。在import dropbox

from dropbox.files import WriteMode

from dropbox.exceptions import ApiError, AuthError

d = dropbox.Dropbox('xxxxxxxxx')

with open(pricing_plan_unit_no_data_csv_path, 'rb') as f:

# We use WriteMode=overwrite to make sure that the settings in the file

# are changed on upload

BACKUPPATH = '/IH_Permit_and_Title_processing/Title_input_for_KNIME/' + lastmonth.strftime("%m_%Y") + '/' + 'plan_unit_'+lastmonth.strftime("%m_%Y")+'_nodata.csv'

print("Uploading " + pricing_plan_unit_no_data_csv_path + " to Dropbox as " + BACKUPPATH + "...")

try:

d.files_upload(f.read(), BACKUPPATH, mode=WriteMode('overwrite'))

f.close()

except ApiError as err:

# This checks for the specific error where a user doesn't have

# enough Dropbox space quota to upload this file

if (err.error.is_path() and err.error.get_path().error.is_insufficient_space()):

sys.exit("ERROR: Cannot back up; insufficient space.")

elif err.user_message_text:

print(err.user_message_text)

sys.exit()

else:

print(err)

sys.exit()

以下是错误

^{pr2}$