erikbern/mta

Invalid wire type error when running run.py

abekohen opened this issue · 2 comments

Tried your run.py, and to be honest I never heard of Wire Types before, but I keep getting the following error:

Traceback (most recent call last):
File "C:\Users\akohen\Desktop\PyFiles\gtfs.py", line 23, in a
feed.ParseFromString(response.read())
File "C:\Python27\ArcGISx6410.3\lib\site-packages\google\protobuf\message.py", line 185, in ParseFromString
self.MergeFromString(serialized)
File "C:\Python27\ArcGISx6410.3\lib\site-packages\google\protobuf\internal\python_message.py", line 1083, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "C:\Python27\ArcGISx6410.3\lib\site-packages\google\protobuf\internal\python_message.py", line 1109, in InternalParse
new_pos = local_SkipField(buffer, new_pos, end, tag_bytes)
File "C:\Python27\ArcGISx6410.3\lib\site-packages\google\protobuf\internal\decoder.py", line 850, in SkipField
return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, end)
File "C:\Python27\ArcGISx6410.3\lib\site-packages\google\protobuf\internal\decoder.py", line 820, in _RaiseInvalidWireType
raise _DecodeError('Tag had invalid wire type.')
DecodeError: Tag had invalid wire type.

no idea what this is, seems like some protobuf thing

It's the result of a "You have no access" message, when using the wrong API_KEY. Hence the message isn't a valid "wire type."