lightalan / subwayclock

Display clock for NYC subways
GNU General Public License v3.0
33 stars 13 forks source link

DecodeError: Truncated message #9

Closed sktusing closed 4 years ago

sktusing commented 4 years ago

Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1127, in MergeFromString if self._InternalParse(serialized, 0, length) != length: File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1181, in InternalParse buffer, new_pos, wire_type) # pylint: disable=protected-access File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/decoder.py", line 969, in _DecodeUnknownField (data, pos) = _DecodeUnknownFieldSet(buffer, pos) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/decoder.py", line 943, in _DecodeUnknownFieldSet (tag_bytes, pos) = ReadTag(buffer, pos) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/decoder.py", line 192, in ReadTag while six.indexbytes(buffer, pos) & 0x80: IndexError: index out of bounds on dimension 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./mta.py", line 180, in print(getTrainTimes("Q03N","Q03S")) File "./mta.py", line 151, in getTrainTimes times = gettimes(f, ourUptownStation, ourDowntownStation) File "./mta.py", line 76, in gettimes feed.ParseFromString(response.content) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/message.py", line 187, in ParseFromString return self.MergeFromString(serialized) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1133, in MergeFromString raise message_mod.DecodeError('Truncated message.') google.protobuf.message.DecodeError: Truncated message.

Getting some errors - not sure how to troubleshoot further. Happens when running as ./mta.py or as ./mta.py 127N 127S.

lightalan commented 4 years ago

Is your API key valid? Are you running the very latest mta.py? (The MTA changed their API on May 1st).

On Mon, May 4, 2020, 6:03 PM Scott K. Tusing notifications@github.com wrote:

Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1127, in MergeFromString if self._InternalParse(serialized, 0, length) != length: File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1181, in InternalParse buffer, new_pos, wire_type) # pylint: disable=protected-access File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/decoder.py", line 969, in _DecodeUnknownField (data, pos) = _DecodeUnknownFieldSet(buffer, pos) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/decoder.py", line 943, in _DecodeUnknownFieldSet (tag_bytes, pos) = ReadTag(buffer, pos) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/decoder.py", line 192, in ReadTag while six.indexbytes(buffer, pos) & 0x80: IndexError: index out of bounds on dimension 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./mta.py", line 180, in print(getTrainTimes("Q03N","Q03S")) File "./mta.py", line 151, in getTrainTimes times = gettimes(f, ourUptownStation, ourDowntownStation) File "./mta.py", line 76, in gettimes feed.ParseFromString(response.content) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/message.py", line 187, in ParseFromString return self.MergeFromString(serialized) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1133, in MergeFromString raise message_mod.DecodeError('Truncated message.') google.protobuf.message.DecodeError: Truncated message.

Getting some errors - not sure how to troubleshoot further. Happens when running as ./mta.py or as ./mta.py 127N 127S.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lightalan/subwayclock/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK7LEU5DRMROS7J6DWFRKO3RP43TNANCNFSM4MZDYPKQ .

sktusing commented 4 years ago

@lightalan Yep - was the API key. Thanks!