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

FileNotFoundError #254

Closed
LotteNotelaers opened this issue Aug 28, 2024 · 5 comments
Closed

FileNotFoundError #254

LotteNotelaers opened this issue Aug 28, 2024 · 5 comments

Comments

@LotteNotelaers
Copy link

I am trying to run the ile-de-france pipeline. I followed the data collection and set-up instructions. However, when I run python -m synpp, I get the following error.

FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\u0141279\cache_ile-de-france\data.spatial.iris__d423afe2d458252282b0cf4f1d86459d.cache\CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01\CONTOURS-IRIS\2_METADONNEES_LIVRAISON_2021-06-00217\CONTOURS-IRIS_2-1_SHP_LAMB93_FXX-2021\IGNF_CONTOURS-IRIS_2-1_SHP_LAMB93_FXX-2021.xml'

image

I do not know how to resolve this issue. I have checked and the CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01 file is downloaded and stored in the folder "iris_2021".
image

When I run docs/verify_data.py, it also returns "errors have been found", which are related to the IRIS 2021 and Zoning 2021.
image

Could you please help me?

Best,
Lotte

@sebhoerl
Copy link
Contributor

Hi, docs/verify_data.py is an old file that should be deleted. We rather run scripts/verify_data.py every week and the data seems to be fine, sorry for the confusion. Regarding your error, I'm not sure what could be the error. It looks like the 7z archive is not unpacked properly (actually, we never use this xml file that is referenced there). Sometimes Windows has trouble with file names that are too long, I'm wondering if this could be the case here. When you check the location where the file is supposed to be located (../data.spatial.iris_{...}.cache/), do you see anything that has been put there?

@LotteNotelaers
Copy link
Author

Hi Sebastian,

Okay. I will not consider the docs/verify_data.py anymore but the other one.

The full path structure is there but it does not include any file. ...\cache_ile-de-france\data.spatial.iris__{...}.cache\CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01\CONTOURS-IRIS\2_METADONNEES_LIVRAISON_2021-06-00217\CONTOURS-IRIS_2-1_SHP_LAMB93_FXX-2021

I tried to add the files manually. Then I get another error:
image

Although the html file is in the folder:
image

@sebhoerl
Copy link
Contributor

sebhoerl commented Aug 30, 2024

Ok, this is the call to remove the files to clean up this folder to regenerate the step. And even if the file exists, Windows seems to be unable to remove it. What Windows are you working on? I have a strong feeling that this may originate from the length of file path limitation on Windows. Our integration tests on Github run on Windows Server 2022, not sure how this relates to Windows 10/11 etc.

Could you try to activate long file paths?
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later)

And you are running this inside a conda environment under Windows, right?

@LotteNotelaers
Copy link
Author

Hi Sebastian,

Activating the long file paths did the job.

Thanks a lot!
Best,
Lotte

@sebhoerl
Copy link
Contributor

sebhoerl commented Sep 4, 2024

Great!

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

2 participants