phkhanhtrinh23 / translation_layoutrecovery

This is a project that translates a .pdf file, preserving the original layout of that .pdf file. [UPDATED] We have achieved the Second Prize of the Cinnamon AI Bootcamp 2023.
https://youtu.be/7ua89iycdoU
64 stars 13 forks source link

Error on translation #12

Open workphone-002 opened 8 months ago

workphone-002 commented 8 months ago

After overcoming some errors #11, apparently the app works, it allows you to create a user and upload a pdf file, however, when I press the translate button I constantly receive an error: image In the console the messages indicate these POST failures:

translation-app-frontend  | - event compiled successfully in 36 ms (288 modules)
translation-app-backend   | [26/Feb/2024 19:17:00] "GET /history/pdfT HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:17:03] "GET /pdf/pdfT?type=all HTTP/1.1" 200 30
translation-app-backend   | [26/Feb/2024 19:17:05] "GET /pdf/pdfT?type=all HTTP/1.1" 200 30
translation-app-backend   | [26/Feb/2024 19:17:08] "POST /user/pdfT HTTP/1.1" 200 255
translation-app-backend   | [26/Feb/2024 19:17:54] "POST /create HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:17:54] "POST /translation HTTP/1.1" 400 45
translation-app-backend   | [26/Feb/2024 19:34:16] "POST /create HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:34:16] "POST /translation HTTP/1.1" 400 45
translation-app-backend   | [26/Feb/2024 19:35:55] "POST /create HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:35:55] "POST /translation HTTP/1.1" 400 45
nbtin commented 8 months ago

Hi @workphone-002 , Glad to see the app works!

Depending on the log you've provided me, the error might occur when you are creating (uploading) a PDF file (status code = 400 BAD REQUEST). Since all user avatars and PDF files will be uploaded to Firebase Cloud Storage, it's essential to ensure its functionality. You can test it by changing the user's avatar. If it doesn't work, the issue is most likely with Firebase.

For further details, if you wish to delve deeper into our code, please click here and navigate to the class named class CreatePDF(APIView). Hope this helps!

workphone-002 commented 8 months ago

Hello, I don't understand. If I reproduce the code to upload documents to the bucket from the command console, the files are uploaded to Firebase without problems. On the other hand, I can't check it anymore because when registering a user I always receive an error "POST /register HTTP/1.1" 400 131, which I don't understand because I managed to register a user correctly in the past and I have built it from 0.