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

Adding an empty geojson source fails with unbound variable error #32

Closed
sansumbrella opened this issue Nov 8, 2019 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@sansumbrella
Copy link

When attempting to add an empty geojson source to my account, the cli crashes. I am attempting to upload an empty file so I can later copy data to my source from an S3 bucket.

tilesets add-source $USER $SOURCE tmp.geojson
Traceback (most recent call last):
  File "/Users/davidwicks/.pyenv/versions/3.6.5/bin/tilesets", line 11, in 
    load_entry_point('tilesets-cli==0.3.2.dev0', 'console_scripts', 'tilesets')()
  File "/Users/davidwicks/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/davidwicks/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/davidwicks/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/davidwicks/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/davidwicks/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/davidwicks/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/davidwicks/.pyenv/versions/3.6.5/lib/python3.6/site-packages/tilesets/scripts/cli.py", line 329, in add_source
    r = requests.post(url, files={"file": ("tileset-source", io)})
UnboundLocalError: local variable 'url' referenced before assignment
@Gerdie
Copy link
Contributor

Gerdie commented Jan 16, 2020

should be resolved by #30

@dnomadb dnomadb added the bug Something isn't working label Feb 14, 2020
@dianeschulze
Copy link
Contributor

@sansumbrella please re-open and add more info if this was not resolved by #30. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants