Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error cant create file already exists #8

Closed
xaccell opened this issue Apr 13, 2023 · 11 comments
Closed

error cant create file already exists #8

xaccell opened this issue Apr 13, 2023 · 11 comments

Comments

@xaccell
Copy link

xaccell commented Apr 13, 2023

Everytime I try to load a local PDF, it answers the first question, but after that it errors out with "cant create file that already exists".

@bhaskatripathi
Copy link
Owner

could you please try now. I had added a temporary embeddings file which was causing this error. Now I am able to run it correctly:
image

@xaccell
Copy link
Author

xaccell commented Apr 19, 2023

Did you fix the source code also so I could try it locally?

@bhaskatripathi
Copy link
Owner

yes, please get the latest code

@zerickk
Copy link

zerickk commented Apr 26, 2023

I just pulled the latest code and am also experiencing this issue.
"FileExistsError: [WinError 183] Cannot create a file when that file already exists: "

@bhaskatripathi
Copy link
Owner

@zerickk
Copy link

zerickk commented Apr 26, 2023

Please use this file https://huggingface.co/spaces/bhaskartripathi/pdfChatter/blob/main/app.py

Thank you. I just tried and still have the same error.

@bhaskatripathi
Copy link
Owner

The error you are getting is because the earlier code was checking if the embedding is created and save temporarily, it is not reloaded. This can save the computational effort of creating embedding on every call. However, as that code had some issue, I had removed that from the latest version. It looks like you are still using the previous code. Could you plz do a viewdiff ?

@zerickk
Copy link

zerickk commented Apr 26, 2023

I just copied the text from the link you sent and ran it. It has the changes indicated by hugginface on lines 52 and 188.
Line 52: chunk = f'[Page no. {idx+start_page}]' + ' ' + '"' + chunk + '"'
Is this the correct version?

@bhaskatripathi
Copy link
Owner

Yes that is correct

@xaccell
Copy link
Author

xaccell commented Apr 27, 2023

the error still happens after a while

@bhaskatripathi
Copy link
Owner

I have tried it again and again but Not able to replicate it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants