openai / openai-cookbook

Examples and guides for using the OpenAI API
https://cookbook.openai.com
MIT License
59.86k stars 9.54k forks source link

Invalid path due to unnecessary duplicate folder prevents repository from being cloned #1418

Open Martin4ndersen opened 1 month ago

Martin4ndersen commented 1 month ago

Identify the file (directory) to be fixed examples/data/hotel_invoices/extracted_invoice_json

Describe the problem When attempting to clone the repository, the process fails due to an invalid file path. Specifically, the file examples/data/hotel_invoices/extracted_invoice_json /20190119_002_extracted.json contains an extra space between extracted_invoice_json and the filename. This causes the following error during the checkout of the working tree:

error: invalid path 'examples/data/hotel_invoices/extracted_invoice_json /20190119_002_extracted.json'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.

Upon inspection, it appears that this path is an unnecessary duplicate of the valid folder examples/data/hotel_invoices/extracted_invoice_json/, which already exists without the space.

Describe a solution The issue can be resolved by removing the folder with the invalid path (examples/data/hotel_invoices/extracted_invoice_json /) from the repository. This will prevent the path conflict and allow users to clone the repository without issues.

Additional context This error commonly occurs on operating systems that enforce strict path constraints, such as Windows, which I am using.

kpapadatos commented 1 month ago

If you have this issue on Windows and you have WSL, you can just:

wsl -- git checkout main