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

Using this command "label-maker images" getting an error and not able to download the tiles! #156

Closed
PallawiSinghal opened this issue Nov 20, 2019 · 2 comments

Comments

@PallawiSinghal
Copy link
Contributor

label-maker images --dest /home/pallawi/my_new_project/label-maker/data1 --config /home/pallawi/my_new_project/label-maker/config.json

Downloading 11 tiles to /home/pallawi/my_new_project/label-maker/data1/tiles
Traceback (most recent call last):
File "/home/pallawi/my_new_project/venv/bin/label-maker", line 11, in
sys.exit(cli())
File "/home/pallawi/my_new_project/venv/lib/python3.6/site-packages/label_maker/main.py", line 110, in cli
download_images(dest_folder=dest_folder, **config)
File "/home/pallawi/my_new_project/venv/lib/python3.6/site-packages/label_maker/images.py", line 125, in download_images
image_function(tile, imagery, tiles_dir, imagery_offset, kwargs)
TypeError: download_tile_tms() takes 4 positional arguments but 5 were given

I have these five files in my data1 directory:
1.classification.geojson
2.labels.npz
3.togo.geojson
4.togo-z12.mbtiles
5.togo.mbtiles

and this is my config file:
{
"country": "togo",
"bounding_box": [1.09725, 6.05520, 1.34582, 6.30915],
"zoom": 12,
"classes": [
{ "name": "Roads", "filter": ["has", "highway"] },
{ "name": "Buildings", "filter": ["has", "building"] }
],
"imagery": "http://a.tiles.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=pk.eyJ1IjoicGFsbGF3azBqM2lwamN5enkolokhnbggggaJKMMNOWAUUV47kU7CQ",
"background_ratio": 1,
"ml_type": "classification"
}

@PallawiSinghal
Copy link
Contributor Author

PallawiSinghal commented Nov 21, 2019

Solved it:
Replace --->>>> def download_tile_tms(tile, imagery, folder, kwargs):
to this
------------->>>>>def download_tile_tms(tile, imagery, folder, imagery_offset,kwargs):
in the utils.py file.

@wronk
Copy link
Contributor

wronk commented Dec 13, 2019

Closed via #157 and #161

@wronk wronk closed this as completed Dec 13, 2019
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