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

loader.py won't bulkload on my computer #106

Closed
gaurav opened this issue Aug 26, 2011 · 10 comments
Closed

loader.py won't bulkload on my computer #106

gaurav opened this issue Aug 26, 2011 · 10 comments

Comments

@gaurav
Copy link
Collaborator

gaurav commented Aug 26, 2011

As of @60bad99afb5, my loader.py has two problems I can't figure out:

  1. Running python loader.py (or python loader.py --url=http://localhost:8080/_ah/remote_api --config_file=bulkload.yaml) exits prematurely with the following error:

    INFO:root:All collection metadata saved to collection.csv.txt
    INFO:root:Collections in jetz: ['birds']
    INFO:root:Processing 1 layers in the birds collection
    INFO:root:Extracting DBF fields from abeillia_abeillei.shp
    INFO:root:All collection metadata saved to collection.csv.txt
    Traceback (most recent call last):
    File "loader.py", line 265, in
    main()
    File "loader.py", line 242, in main
    filename = os.path.abspath('%s/%s/collection.csv.txt' % (sd, coll_dir))
    NameError: global name 'coll_dir' is not defined

coll_dir in only defined inside the for collection in config.collections(): loop on line 101, so I think maybe the chunk of code referring to coll_dir might have fallen out of the loop at some point.

  1. If I run python loader.py -s iucn, the program exits without any error messages, but also without attempting bulkloading of the processed data (it appears to write the collection metadata to collection.csv.txt and exit). Running python loader.py --url=http://localhost:8080/_ah/remote_api --config_file=bulkload.yaml -s iucn produces exactly the same result. I'm not sure why it isn't attempting to bulkload the data.

Can anybody else reproduce this on their computers, or have I messed something up on my end?

@eightysteele
Copy link
Collaborator

Quick sanity check: What's your OS and Python version?

@eightysteele
Copy link
Collaborator

More sanity checking... I'm assuming you have the app running on http://localhost:8080 and that you're working off latest code in the master branch?

@eightysteele
Copy link
Collaborator

Just pulled latest from master and I can reproduce. @tucotuco: Bump..

@gaurav
Copy link
Collaborator Author

gaurav commented Aug 26, 2011

OS: MacOS X 10.6.8
Python: Python 2.6.1

Nope, I don't have the app running at all - I was hoping for some sort of "could not connect to the server" message. I just tried it again with the app on; I got exactly the same result I reported above.

Yep, I'm on the latest code: @60bad99afb5e.

eightysteele added a commit that referenced this issue Aug 26, 2011
@eightysteele
Copy link
Collaborator

With the latest commit @1bb1404 you can run it via ./loader.py -d which completes as a dry run without bulkloading. If you attempt to bulkload, it currently fails since polygonid isn't making it into collection.polygons.json.txt. Looking into that now.

eightysteele added a commit that referenced this issue Aug 26, 2011
@eightysteele
Copy link
Collaborator

Almost there. In @1bb1404 things are working except for that missing polygonid for iucn/mammals. Looking into that right now with @tucotuco.

eightysteele added a commit that referenced this issue Aug 26, 2011
@eightysteele
Copy link
Collaborator

Fixed and pushed. Can @tucotuco and @gaurav confirm?

@tucotuco
Copy link
Collaborator

Confirmed. jetz and iucn loading to local App Engine and maintaining
polygonids.

On Thu, Aug 25, 2011 at 10:58 PM, eightysteele
reply@reply.github.com
wrote:

Fixed and pushed. Can @tucotuco and @gaurav confirm?

Reply to this email directly or view it on GitHub:
#106 (comment)

@eightysteele
Copy link
Collaborator

Closing issue, pending feedback from @gaurav.

@gaurav
Copy link
Collaborator Author

gaurav commented Aug 26, 2011

Works for me! Thanks for fixing this!

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

3 participants