sharedstreets / sharedstreets-python

SharedStreets (Python)
https://sharedstreets.io
MIT License
64 stars 16 forks source link

Unexpected keyword argument "file" #21

Open kuanb opened 5 years ago

kuanb commented 5 years ago

Edit: See this comment (https://github.com/sharedstreets/sharedstreets-python/issues/21#issuecomment-487128064), the issue is that protobuf was upgraded on Mar 26 from 3.7.0 to 3.7.1. This upgrade breaks SS throwing the below error/traceback.

Original content:


In a fresh container I pip install ss:

pip install sharedstreets

It install successfully. I then run the following command:

sharedstreets-get-tile 16 10509 25324 > 16-10509-25324.geojson

The following error is emitted:

Traceback (most recent call last):
  File "/usr/local/bin/sharedstreets-get-tile", line 7, in <module>
    from sharedstreets.tile import main
  File "/usr/local/lib/python3.6/site-packages/sharedstreets/tile.py", line 4, in <module>
    from . import sharedstreets_pb2
  File "/usr/local/lib/python3.6/site-packages/sharedstreets/sharedstreets_pb2.py", line 148, in <module>
    options=None, file=DESCRIPTOR),
TypeError: __init__() got an unexpected keyword argument 'file'

This is the version of ss being used:

pip list | grep sharedstreets
sharedstreets      0.4.0
kuanb commented 5 years ago

I wonder if this is the result of the recently released update to protobuf, from 3.7.0 to 3.7.1:

image Released on Mar 26: https://pypi.org/project/protobuf/3.7.1/

kuanb commented 5 years ago

Yep, confirmed that this is the problem. SS library breaks with update of protobuf from 3.7.0 to 3.7.1. I uninstalled 3.7.1 and reinstalled protobuf, specifying version 3.7.0. SS works again!