Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when testing mta.py #11

Open
seanykasp opened this issue Dec 4, 2021 · 6 comments
Open

Error when testing mta.py #11

seanykasp opened this issue Dec 4, 2021 · 6 comments

Comments

@seanykasp
Copy link

Im running into an issue when testin ./mta.py

I am receiving the following - are able to help point me in the right direction?

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 72, in gettimes
response = requests.get(feed, headers=headers, timeout=30)
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.7/http/client.py", line 1244, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1285, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.7/http/client.py", line 1217, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\ufeff' in position 0: ordinal not in range(256)

@lightalan
Copy link
Owner

lightalan commented Dec 4, 2021 via email

@seanykasp
Copy link
Author

seanykasp commented Dec 8, 2021 via email

@lightalan
Copy link
Owner

lightalan commented Dec 8, 2021 via email

@seanykasp
Copy link
Author

seanykasp commented Dec 8, 2021 via email

@lightalan
Copy link
Owner

lightalan commented Dec 8, 2021 via email

@seanykasp
Copy link
Author

seanykasp commented Dec 8, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants