Open MrArabAi opened 1 year ago
are you on windows?
Sent from Outlook for iOShttps://aka.ms/o0ukef
From: Fadi Ai @.> Sent: Saturday, September 9, 2023 7:08:02 PM To: Elliott-Chong/chatpdf-yt @.> Cc: Subscribed @.***> Subject: [Elliott-Chong/chatpdf-yt] Issues uploading pdf (Issue #2)
Hi Elliott
there are some issues i came across and i cant solve it by my self. I'm learning from u
and this is the console error that i get : Error: could not download from s3 at loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:38:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) uploads/1694257515896Converted_Amazon.pdf Converted_Amazon.pdfdownloading s3 into file system Error: ENOENT: no such file or directory, open '/tmp/pdf-1694257516460.pdf' at Object.openSync (node:fs:601:3) at Object.writeFileSync (node:fs:2249:35) at downloadFromS3 (webpack-internal:///(rsc)/./src/lib/s3-server.ts:29:51) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:36:23) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) { errno: -4058, syscall: 'open', code: 'ENOENT', path: '/tmp/pdf-1694257516460.pdf' } Error: could not download from s3 at loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:38:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) (node:8964) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3). For more information, check the migration guide at https://a.co/7PzMCcy (Use node --trace-warnings ... to show where the warning was created)
on the site i also get this following errors :
[image]https://user-images.githubusercontent.com/73393700/266776810-928304aa-73fa-4238-a09a-c58634658696.png [image]https://user-images.githubusercontent.com/73393700/266776814-044084b7-55f9-4735-8a97-ec04e41dd245.png
Thanks for your support
— Reply to this email directly, view it on GitHubhttps://github.com/Elliott-Chong/chatpdf-yt/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASLQSDKUPVNICBIJKJ6JBXDXZREZFANCNFSM6AAAAAA4RMACKQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
are you on windows? Sent from Outlook for iOShttps://aka.ms/o0ukef … ____ From: Fadi Ai @.> Sent: Saturday, September 9, 2023 7:08:02 PM To: Elliott-Chong/chatpdf-yt @.> Cc: Subscribed @.> Subject: [Elliott-Chong/chatpdf-yt] Issues uploading pdf (Issue #2) Hi Elliott there are some issues i came across and i cant solve it by my self. I'm learning from u [image]https://user-images.githubusercontent.com/73393700/266776747-01ed1ed2-49a6-4b84-bda4-a816c1828d2b.png and this is the console error that i get : Error: could not download from s3 at loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:38:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) uploads/1694257515896Converted_Amazon.pdf Converted_Amazon.pdfdownloading s3 into file system Error: ENOENT: no such file or directory, open '/tmp/pdf-1694257516460.pdf' at Object.openSync (node:fs:601:3) at Object.writeFileSync (node:fs:2249:35) at downloadFromS3 (webpack-internal:///(rsc)/./src/lib/s3-server.ts:29:51) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:36:23) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) { errno: -4058, syscall: 'open', code: 'ENOENT', path: '/tmp/pdf-1694257516460.pdf' } Error: could not download from s3 at loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:38:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) (node:8964) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023. Please migrate your code to use AWS SDK for JavaScript (v3). For more information, check the migration guide at https://a.co/7PzMCcy (Use node --trace-warnings ... to show where the warning was created) on the site i also get this following errors : [image]https://user-images.githubusercontent.com/73393700/266776810-928304aa-73fa-4238-a09a-c58634658696.png [image]https://user-images.githubusercontent.com/73393700/266776814-044084b7-55f9-4735-8a97-ec04e41dd245.png Thanks for your support — Reply to this email directly, view it on GitHub<#2>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASLQSDKUPVNICBIJKJ6JBXDXZREZFANCNFSM6AAAAAA4RMACKQ. You are receiving this because you are subscribed to this thread.Message ID: @.>
Yes i use windows
I have the same issue when using Windows, I think we don't have this folder called /tmp or we cant acheive with this folder path. I have WSL on my PC so i use my ubuntu path like this //wsl.localhost/Ubuntu/tmp/pdf-${Date.now()}.pdf
to create the PDF and works well
So
I have the same issue when using Windows, I think we don't have this folder called /tmp or we cant acheive with this folder path. I have WSL on my PC so i use my ubuntu path like this
//wsl.localhost/Ubuntu/tmp/pdf-${Date.now()}.pdf
to create the PDF and works well
So why should we have the tmp file locally if we have aws S3 ? i dont get this one
we need to download the file locally first in order for langchain to read its contents
langchain is not able to read the text content of the pdf file from s3
Sent from Outlook for iOShttps://aka.ms/o0ukef
From: Fadi Ai @.> Sent: Saturday, September 9, 2023 8:59:20 PM To: Elliott-Chong/chatpdf-yt @.> Cc: Elliott Chong @.>; Comment @.> Subject: Re: [Elliott-Chong/chatpdf-yt] Issues uploading pdf (Issue #2)
So
I have the same issue when using Windows, I think we don't have this folder called /tmp or we cant acheive with this folder path. I have WSL on my PC so i use my ubuntu path like this //wsl.localhost/Ubuntu/tmp/pdf-${Date.now()}.pdf to create the PDF and works well
So why should we have the tmp file locally if we have aws S3 ? i dont get this one
— Reply to this email directly, view it on GitHubhttps://github.com/Elliott-Chong/chatpdf-yt/issues/2#issuecomment-1712505751, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASLQSDJJW33GAY7QKGTXMM3XZRR2RANCNFSM6AAAAAA4RMACKQ. You are receiving this because you commented.Message ID: @.***>
Thank you!!!
is there any solution for windows users ? @MatthewAraujo @fadi9696
is there any solution for windows users ? @MatthewAraujo @fadi9696
You can put this path C:\ and create a folder tmp
and use this path C:\tmp
@apurvjha123 Consider adding this condition
// Save the file in the temp directory.
if (os.platform() === "win32") {
fileNameToSave = `C:\\Users\\${
os.userInfo().username
}\\AppData\\Local\\Temp\\pdf-${Date.now()}.pdf`;
} else {
fileNameToSave = `/tmp/pdf-${Date.now()}.pdf`;
}
make sure to add the os import at the top. Hope this helps!
I'm having the same problem😭
I have same error on macos. Is there anyone has a solution?
Hi Elliott
there are some issues i came across and i cant solve it by my self. I'm learning from u
and this is the console error that i get : Error: could not download from s3 at loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:38:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) uploads/1694257515896Converted_Amazon.pdf Converted_Amazon.pdfdownloading s3 into file system Error: ENOENT: no such file or directory, open '/tmp/pdf-1694257516460.pdf' at Object.openSync (node:fs:601:3) at Object.writeFileSync (node:fs:2249:35) at downloadFromS3 (webpack-internal:///(rsc)/./src/lib/s3-server.ts:29:51) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:36:23) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) { errno: -4058, syscall: 'open', code: 'ENOENT', path: '/tmp/pdf-1694257516460.pdf' } Error: could not download from s3 at loadS3IntoPinecone (webpack-internal:///(rsc)/./src/lib/pinecone.ts:38:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async POST (webpack-internal:///(rsc)/./src/app/api/create-chat/route.ts:31:9) at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) (node:8964) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy (Use
node --trace-warnings ...
to show where the warning was created)on the site i also get this following errors :
Thanks for your support