-
Notifications
You must be signed in to change notification settings - Fork 40
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
decoder setting #47
Comments
Hi, sorry to hear you're having a problem. I'm not following your description of it though. Can you provide a code snippet of what you're trying to do? Are you sure that endpoint you linked provides an SSE stream? |
@btubbs Hello. I can confirm that it happens also for me. Error File "/builds/Sse.py", line XYZ, in ASDASDASDASD
for event in self._client:
File "/usr/lib/python3.8/site-packages/sseclient.py", line 100, in __next__
self._connect()
File "/usr/lib/python3.8/site-packages/sseclient.py", line 58, in _connect
self.decoder = codecs.getincrementaldecoder(
File "/usr/lib/python3.8/codecs.py", line 995, in getincrementaldecoder
decoder = lookup(encoding).incrementaldecoder
TypeError: lookup() argument must be str, not None Where: self._client = SSEClient(url, retry=0, verify=False)
self._client.resp.raise_for_status() Seems like it is problem with Line 59 in bb36b9e
Where: The server's endpointJava Spring SseEmiter is being used as a server. In this case it works via Nginx:
That is a Header response for the SSE end-point. What I have noticedThere is a lot of dependencies, but regarding changes where SSEClient was working I can conclude that:
Exploring the repoCommit 2aff290 has added this line without ensuring that passed parameter is not None GuessesMost likely |
Hey did you solve it? I am having the same issue here using an http client thatr needs to comunicate with a Leshan LWM2M Server |
@andreafresa in my case |
Fix Issue #47: using Response.apparent_encoding when Response.encoding is None
This issue was resolved with PR #51 |
Hi,
I use sseclient to send a request to https://api.trafikinfo.trafikverket.se/v2/data.json, and the got the following error
But when I am looking into the test scripts or examples from programcreek.com, I don't see any example were setting encoder or decoder in the request.
Can someone help? Thanks a lot.
The text was updated successfully, but these errors were encountered: