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

Bug: partial unzips result in failing functionality #90

Open
tbeertje21 opened this issue Nov 1, 2019 · 1 comment
Open

Bug: partial unzips result in failing functionality #90

tbeertje21 opened this issue Nov 1, 2019 · 1 comment

Comments

@tbeertje21
Copy link

I only need the Brussels part of best-full-latest.zip. So, I only extract the Brussels' files from the zip (avoids a lot of waste of disk space)...
So, I'd expect this to work as per targetting functionality as per --help:
... --region {belgium,brussels,flanders,wallonia}

However (reproduceable):
...>python converter.py --verbose --region brussels . bru.csv
2019-11-01 18:45:28,477 - main : ERROR - File for data of type ['FlandersAddress', 'FlandersMunicipality', 'FlandersPostalinfo', 'FlandersStreetname', 'WalloniaAddress', 'WalloniaMunicipality', 'Wallon
iaPartOfMunicipality', 'WalloniaPostalinfo', 'WalloniaStreetname'] was not found in the input folder

To my understanding, the check in converter.py line 56 keys = FILE_KEYS is needlessly strict: it Must only check required files. This seems a bug to me.

Bypass for me: in constants.py, removed lines so that FILE_KEYS = [
'BrusselsAddress',
'BrusselsMunicipality',
'BrusselsPostalinfo',
'BrusselsStreetname'
]

@theodedeken
Copy link
Collaborator

Not necessarily a bug as the converter script is intended to work in conjunction with the downloader script which extracts all files.

But you have a valid point that extracting all files when you only need a part of it wastes disk space. So I will look into adding a partial extract option and removing the strict file check.

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