I have been using aspose cloud slides to merge 10 powerpoints for years now. the powerpoints have not gone up in size much but now i get.
File "C:\Python310\lib\site-packages\asposeslidescloud\rest.py", line 248, in request
raise ApiException(http_resp=r)
asposeslidescloud.rest.ApiException: (504)
Reason: Gateway Time-out
HTTP response headers: HTTPHeaderDict({'Date': 'Sat, 03 Aug 2024 19:52:26 GMT', 'Content-Type': 'text/html', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'cache-control': 'no-cache'})
HTTP response body: b"<html><body><h1>504 Gateway Time-out</h1>\nThe server didn't respond in time.\n</body></html>\n\n"
I even started using the Async methods and it worked once or twice but now it loops in the “Created” operation status and never gets to the started. Even when i bring it down and just try to merge 2 or 3 powerpoints.
Very Frustrating each powerpoint is only 20-30mb and i have been doing this for years now. How could it stop working all of the sudden
@Corvettemina1 ,
Thank you for contacting support.
We are sorry that you have to encounter this problem. Please share the following files and information:
sample presentation files
code example to reproduce the error
version of Aspose.Slides Cloud SDK for Python you used
for i in range(0, len(finishedList), 10):
try:
log = open(path + 'PowerPoints/configs/Logs/log ' + currentDate + '.txt', 'a')
except:
log = open(path + 'PowerPoints/configs/Logs/log ' + currentDate + '.txt', 'w')
files = []
filesToremove = []
x = 10
if(len(finishedList[i+10:i+20]) < 2):
x = 11
for k in finishedList[i:i+x]:
if ("today.pptx" in path + k):
filesToremove.append(path+k)
try:
with open(path + k, "rb") as file_stream:
files.append(file_stream.read())
now = datetime.datetime.now()
timestamp = now.strftime("%Y-%m-%d_%H-%M-%S")
log.write(timestamp + " " + path + k + "\n")
print(path + k)
listTosend.append(path + k)
if(finishedList.index(k,index) > finishedList.index("PowerPoints/BackBone/communionMenuTemplate.pptx") and finishedList.index(k,index) < finishedList.index("PowerPoints/BackBone/finalConclusion1.pptx")):
pptxLengths[str(k.split("/")[-1].split(".")[0])] = (len(Presentation(path + k).slides))
if(finishedList.index(k,index) < finishedList.index("PowerPoints/BackBone/communionMenuTemplate.pptx") and atMenu == False):
totalBeforeCommunion = totalBeforeCommunion + (len(Presentation(path + k).slides))
if(k == "PowerPoints/BackBone/communionMenuTemplate.pptx"):
atMenu = True
#totalBeforeCommunion = totalBeforeCommunion - 1
except:
try:
with open(getfile_insensitive(path + k), "rb") as file_stream:
files.append(file_stream.read())
now = datetime.datetime.now()
timestamp = now.strftime("%Y-%m-%d_%H-%M-%S")
log.write(timestamp + " " + path + k + "\n")
print(path + k)
listTosend.append(getfile_insensitive(path + k))
if(finishedList.index(k,index) > finishedList.index("PowerPoints/BackBone/communionMenuTemplate.pptx") and finishedList.index(k,index) < finishedList.index("PowerPoints/BackBone/finalConclusion1.pptx")):
pptxLengths[str(k.split("/")[-1].split(".")[0])] = (len(Presentation(getfile_insensitive(path + k)).slides))
if(finishedList.index(k,index) < finishedList.index("PowerPoints/BackBone/communionMenuTemplate.pptx") and atMenu == False):
totalBeforeCommunion = totalBeforeCommunion + (len(Presentation(getfile_insensitive(path + k)).slides))
if(k == "PowerPoints/BackBone/communionMenuTemplate.pptx"):
atMenu = True
except:
pass
#print("Before Communion" , totalBeforeCommunion)
index+=1
log.close()
print("uploading....")
slides_api = SlidesApi(
None, "*****", "*****")
# slides_api.merge_and_save_online(
# str(count) + ".pptx", files, None, "internal")
presentation = PresentationToMerge()
presentation.path = str(count) + ".pptx"
presentation.source = "Storage"
presentaionsArray.append(presentation)
for i in filesToremove:
try:
os.remove(i)
except:
pass
count += 1
if x == 11:
break
This is the code.
i am using version 24.7.0
I was on 22 previously then the error occurred. i updated it and now here i am
at the end of this loop i merge all 10 of the powerpoints. thats where it always fails
@Corvettemina1 ,
Thank you for the additional information.
Unfortunately, I was unable to reproduce the error you described.
Could you please indicate the exact version of Aspose.Slides Cloud SDK for Python you used?
Corvettemina1:
i am using version 24.7.0
i updated it and now here i am
at the end of this loop i merge all 10 of the powerpoints. thats where it always fails
Could you share the full stack trace of the error you are encountering with version 24.7 now?
Could you share a code example with the async methods you used?