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

Multiple issues doing a clean UK import (using vagrant) #265

Closed
torotil opened this issue Sep 26, 2016 · 2 comments
Closed

Multiple issues doing a clean UK import (using vagrant) #265

torotil opened this issue Sep 26, 2016 · 2 comments
Assignees

Comments

@torotil
Copy link
Contributor

torotil commented Sep 26, 2016

I have multiple issues trying to do a new import of all the current UK data following this guide. Currently I'm stuck at

./manage.py mapit_UK_scilly --allow-no-location-postcodes \
   --allow-terminated-postcodes ../data/ONSPD/Data/ONSPD_MAY_2016_UK.csv

Which fails with mapit.models.DoesNotExist: Postcode matching query does not exist.


On my journey there I already had to fix several issues.

  1. Vagrant doesn't find the VagrantFile: Renamed to Vagrantfile and now it works. I also had to increase the memory a bit to be able to run the import.
  2. mapit_UK_import_osni - The argument types for the --*-srid arguments are all strings. They should be callables. Removing the quotes helped.
  3. mapit_UK_import_onspd is missing the call to super().add_arguments().
@dracos
Copy link
Member

dracos commented Sep 27, 2016

Sorry about that, and thanks for tracking those things down. For the main issue, it looks to be that the documentation has got you to import only the live ONSPD postcodes, but the Scilly line is telling you to also look at postcodes without location or dead postcodes, which then aren't present in the database, hence the error. This would actually be solved better by #219 (which then wouldn't care which postcodes you had imported or not), but for now I think you can just either import those no-location/terminated postcodes in your main import, or not include them in the Scilly line.

Will go and fix the things you raised now :) PR at #265

@torotil
Copy link
Contributor Author

torotil commented Sep 29, 2016

Great the PR includes all the issues I've had and more.

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