-
Notifications
You must be signed in to change notification settings - Fork 75
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
Windows error : Filename too long #1201
Comments
A way to fix this will be to stop using sub-path and files for parameters and use a unique file, like a database. But it will be more complicated to maintain. An option is to keep separate files for development but package them in one for the package release. Any ideas ? |
Thank you for sharing this issue! Is it linked to the CASD environment where we might not have enough rights to change the Windows OS default path lengths?
And to add some context:The described error is linked to the openfisca_france_reforms repository which contains some reforms to the Then, as the way we manage the parameters in the openfisca models also comes from This issue also refers to the leximpact-prepare-data repository: it calls @benoit-cty don't hesitate to edit this section if needed 😊 |
Thanks for the precisions! |
Thanks for reporting this issue @benoit-cty. Given that the use of sub-folders is not enforced by core but just an opinionated practice of country-package maintainers, do you see what could be fixed in core to help users facing this issue?
You can already do that.
All parameters are loaded in memory, so « compiling » all files into one and using that one parameter file should be more or less trivial. However, as with the previous idea, that is a script that can be perfectly implemented either within a country package, or as an utility function separately, without requiring any changes in core at all.
That might be actually related to core, but I'm not sure: variables (and I assume extensions are reforms) are loaded dynamically by core, with a unique id corresponding to the addess in memory of each variable. However, I believe that happens after the file is read into memory, so I suspect that the problem you report happens before (and this mechanism by the way does not apply to parameters). By the way, I don't know if it is related to this specifically conda/conda#7203 |
@benoit-cty @sandcha An idea: find openfisca_france/parameters -name "*.yaml" | xargs -I{} sh -c 'cat {}; echo ""' >> parameters.yaml (However, there is a possible issue concerning core here: namespacing, which is in fact derived from path). |
Here is what I did:
Install OpenFisca France on Windows using Conda and an
environment.yaml
Here is what I expected to happen:
Install with success.
Here is what actually happened:
error: unable to create file openfisca_france_reforms/plf_2022/parameters/prestations_sociales/prestations_etat_de_sante/invalidite/aah/abattement_conjoint_salarie_forfait_enfant.yaml: Filename too long
In OpenFisca-France we enforce a limit of 150 character for path parameters.
But it is not enought because Conda (or pip ?) use a temp path named
C:\Users\bcourty\AppData\Local\Temp\pip-install-oboo5tz8\openfisca-france-reforms_9411943aa5784ca9bcc79d7d516ec176\
So the sum is above the 260 characters limit of Windows.
Here is data (or links to it) that can help you reproduce this issue:
environment.yaml
content:Context
I identify more as a:
The text was updated successfully, but these errors were encountered: