eqasim-org / ile-de-france

An open synthetic population of Île-de-France for agent-based transport simulation
GNU General Public License v2.0
51 stars 71 forks source link

Long Path in Windows (not about git) #259

Closed Nitnelav closed 1 month ago

Nitnelav commented 2 months ago

FYI, I just had to enable "LongPaths" on my Windows 10 machine to make the extraction of the iris_2021 7zip archive function without throwing a (poorly descriptive) FileNotFoundError. Before LongPathsEnabled :

py7zr x --verbose D:\SOLID\eqasim-data\idf_2015\iris_2021\CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01.7z D:\SYMEXPO\eqasim-ile-de-france\cache\data.spatial.iris__4e2cad7c7b6b34f65074a81f51c6fb32.cache
...
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\SYMEXPO\\eqasim-ile-de-france\\cache\\data.spatial.iris__4e2cad7c7b092726e7af131f51c6fb32.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'

Enabling Long paths : set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled to 1 Then it works :

py7zr x --verbose D:\SOLID\eqasim-data\idf_2015\iris_2021\CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01.7z D:\SYMEXPO\eqasim-ile-de-france\cache\data.spatial.iris__4e2cad7c7b6b34f65074a81f51c6fb32.cache
...
- CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01/CONTOURS-IRIS/1_DONNEES_LIVRAISON_2021-06-00217                                                      (100%) 
- CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01/CONTOURS-IRIS                                                                                        (100%) 
- CONTOURS-IRIS_2-1__SHP__FRA_2021-01-01                                                                                                      (100%)

We could juste make a "Windows users" section in the documentation with this and the git part maybe ...

sebhoerl commented 2 months ago

Yes, we just had this some weeks ago :) https://github.com/eqasim-org/ile-de-france/issues/254

Nitnelav commented 2 months ago

Ah yes my bad for not searching for that here :)

sebhoerl commented 2 months ago

Let's still keep the issue open. Adding some documentation / warning for Windows is a good action point.