dissorial / doc-chatbot

Document chatbot — multiple files, topics, chat windows and chat history. Powered by GPT.
813 stars 137 forks source link

API resolved without sending a response #1

Closed avinahome closed 1 year ago

avinahome commented 1 year ago

I am on Windows 11, and I think I have everything setup correctly, but I am getting this error when trying to load a new namespace:

API resolved without sending a response for /api/upload, this may result in stalled requests. error - unhandledRejection: Error: ENOENT: no such file or directory, rename 'C:\Users\avina\AppData\Local\Temp\B4yWRxiHcgn9Q2jTRMqO23jW.pdf' -> 'F:\pdf-chatbot/docs/na-13075-questionnaire-about-military-service.pdf' at Object.renameSync (node:fs:1040:3) at eval (webpack-internal:///(api)/./pages/api/upload.ts:38:55) at F:\pdf-chatbot\node_modules\multiparty\index.js:139:9 at F:\pdf-chatbot\node_modules\multiparty\index.js:118:9 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { errno: -4058, syscall: 'rename', code: 'ENOENT', path: 'C:\Users\avina\AppData\Local\Temp\B4yWRxiHcgn9Q2jTRMqO23jW.pdf', dest: 'F:\pdf-chatbot/docs/na-13075-questionnaire-about-military-service.pdf' }

dissorial commented 1 year ago

My bad -- I forgot that github doesn't push empty directories to repos. There needs to an empty 'docs' folder in root for this to work properly. You can either add it yourself or pull the changes (I updated the repo with a .gitkeep inside of 'docs')

avinahome commented 1 year ago

Original repo had the same missing folder, no sweat. Thanks!

avinahome commented 1 year ago

I created the docs folder, I haven't pulled anything new if there is anything yet, and I am still getting the error, even with the item IN the docs folder. It looks like, to me... that the copy is trying to go from the temp folder TO the docs folder, but I am sure I could be wrong. I am very new to this

path: 'C:\Users\avina\AppData\Local\Temp\B4yWRxiHcgn9Q2jTRMqO23jW.pdf', dest: 'F:\pdf-chatbot/docs/na-13075-questionnaire-about-military-service.pdf'

dissorial commented 1 year ago

Ah I see, I hardcoded windows path format -- I updated the repo to work with unix-based systems. Try to pull the new changes into yours and see if it works now.