# "mapbox\_vector\_tile" error when trying to collect stop sign coordinates

**URL:** <https://forum.mapillary.com/t/mapbox-vector-tile-error-when-trying-to-collect-stop-sign-coordinates/5278>\
**Category:** Map data and detections\
**Created:** [August 20, 2021, 3:14pm UTC](https://forum.mapillary.com/t/mapbox-vector-tile-error-when-trying-to-collect-stop-sign-coordinates/5278 "2021-08-20T15:14:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WyattP01](https://avatars.discourse-cdn.com/v4/letter/w/ac91a4/32.png) [@WyattP01](https://forum.mapillary.com/u/WyattP01)\
**Post date:** [August 20, 2021, 3:14pm UTC](https://forum.mapillary.com/t/mapbox-vector-tile-error-when-trying-to-collect-stop-sign-coordinates/5278/1 "2021-08-20T15:14:32Z")

</div>

Hello,  
I am trying to collect stop sign data from the downtown Chicago area. All I need is the coordinates of stop signs in said area. But, I am currently experiencing an error from “mapbox\_vector\_tile”. The error is as follows:

```auto
Warning (from warnings module):
  File "C:\Users\"myusername"\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mapbox_vector_tile\decoder.py", line 24
    self.tile.ParseFromString(pbf_data)
RuntimeWarning: Unexpected end-group tag: Not all data was converted

```

The code I am running is as follows:

```auto
import mercantile, mapbox_vector_tile, requests, json
from vt2geojson.tools import vt_bytes_to_geojson

# define an empty geojson as output
output= { "type": "FeatureCollection", "features": [] }

# Mapillary access token -- user should provide their own
access_token = 'MLY|XXX'

# a bounding box in [west_lng,_south_lat,east_lng,north_lat] format
west, south, east, north = [-87.6565881940041,41.867095746832085, -87.62416489250167,41.89259531146177]

# get the list of tiles with x and y coordinates which intersect our bounding box
# MUST be at zoom level 14 where the data is available, other zooms currently not supported
tiles = list(mercantile.tiles(west, south, east, north, 14))

# loop through list of tiles to get tile z/x/y to plug in to Mapillary endpoints and make request
for tile in tiles:
    tile_url = 'https://tiles.mapillary.com/maps/vtp/mly_map_feature_traffic_sign/2/{}/{}/{}?access_token={}'.format(tile.z,tile.x,tile.y,access_token)
    response = requests.get(tile_url)
    data = vt_bytes_to_geojson(response.content, tile.x, tile.y, tile.z)
    # push to output geojson object if yes
    for feature in data['features']:
            output['features'].append(feature)

# save a local geojson with the filtered data
with open('stop_signs.geojson', 'w') as f:
    json.dump(output, f)

```

This in turn leaves the data variable as " {‘type’: ‘FeatureCollection’, ‘features’: } " with no actual data regarding traffic signs. Looking online the only thing I can find regarding this issue states that the error comes from the data being pulled being incorrect or corrupted.

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![BadMantis](https://avatars.discourse-cdn.com/v4/letter/b/898d66/32.png) [@BadMantis](https://forum.mapillary.com/u/BadMantis)\
**Post date:** [September 16, 2021, 12:00pm UTC](https://forum.mapillary.com/t/mapbox-vector-tile-error-when-trying-to-collect-stop-sign-coordinates/5278/2 "2021-09-16T12:00:53Z")

</div>

Hi there,

I am facing the same issue. It is because response.content containts no actual data but an error message stating “You are not loged in. Please log in”.

Requesting from [https://graph.mapillary.com](https://graph.mapillary.com) is working indeed.

What went wrong?

Cheers

---

<div class="post-metadata">

**Author:** ![reichg24](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@reichg24](https://forum.mapillary.com/u/reichg24)\
**Post date:** [December 16, 2021, 9:24pm UTC](https://forum.mapillary.com/t/mapbox-vector-tile-error-when-trying-to-collect-stop-sign-coordinates/5278/3 "2021-12-16T21:24:40Z")

</div>

I started getting the same error. Is it because they limit the amount of api hits?

I am using a multithreading strategy to process large quantities of tiles.

---

<div class="post-metadata">

**Author:** ![ionut\_mntn](https://avatars.discourse-cdn.com/v4/letter/i/b487fb/32.png) [@ionut\_mntn](https://forum.mapillary.com/u/ionut_mntn)\
**Post date:** [February 10, 2022, 7:45pm UTC](https://forum.mapillary.com/t/mapbox-vector-tile-error-when-trying-to-collect-stop-sign-coordinates/5278/4 "2022-02-10T19:45:08Z")

</div>

I think so; most probably, yes! I too am using a multithreaded approach and get similar errors
