Closed merryprankster02 closed 3 years ago
Are you running the latest version of the code? The MTA changed the API a little while ago, and the old code (and your API key) will no longer work. You need the latest code and you'll need to get a new API key.
On Thu, Jul 23, 2020 at 1:02 PM merryprankster02 notifications@github.com wrote:
I noticed that my clock started having problems a little while back but was able to get it working again with a reboot. Recently i attempted this and when it came back up it couldnt connect at all. I attempted to build a new unit to see if something had gotten corrupted but discovered the issue appears to be with the API/mta.py. I noticed that my account no longer let me sign in so i signed up again and when i did so, I tried to run mta.py manually and it returned blank values. I tried to get a new api key and it returns the erros listed below. I was wondering if you had encountered the same thing and if you had modified the script accordingly. It appears the issues stems from the get train times function.
Traceback (most recent call last): File "./mta.py", line 176, in print(getTrainTimes("Q03N","Q03S")) File "./mta.py", line 147, in getTrainTimes times = gettimes(f, ourUptownStation, ourDowntownStation) File "./mta.py", line 72, in gettimes feed.ParseFromString(response.content) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/message.py", line 199, in ParseFromString return self.MergeFromString(serialized) File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1134, 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 1188, 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 977, in _DecodeUnknownField raise _DecodeError('Wrong wire type in tag.') google.protobuf.message.DecodeError: Wrong wire type in tag.
— 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/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK7LEU37KPLCNBNXSX5GWVLR5BUMFANCNFSM4PF5RF2Q .
thanks!
Issue closed with latest update
I noticed that my clock started having problems a little while back but was able to get it working again with a reboot. Recently i attempted this and when it came back up it couldnt connect at all. I attempted to build a new unit to see if something had gotten corrupted but discovered the issue appears to be with the API/mta.py. I noticed that my account no longer let me sign in so i signed up again and when i did so, I tried to run mta.py manually and it returned blank values. I tried to get a new api key and it returns the erros listed below. I was wondering if you had encountered the same thing and if you had modified the script accordingly. It appears the issues stems from the get train times function.
Traceback (most recent call last): File "./mta.py", line 176, in
print(getTrainTimes("Q03N","Q03S"))
File "./mta.py", line 147, in getTrainTimes
times = gettimes(f, ourUptownStation, ourDowntownStation)
File "./mta.py", line 72, in gettimes
feed.ParseFromString(response.content)
File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/message.py", line 199, in ParseFromString
return self.MergeFromString(serialized)
File "/home/pi/.local/lib/python3.7/site-packages/google/protobuf/internal/python_message.py", line 1134, 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 1188, 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 977, in _DecodeUnknownField
raise _DecodeError('Wrong wire type in tag.')
google.protobuf.message.DecodeError: Wrong wire type in tag.