This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: incorrect type conversion from str to bytes in asynchat module in asynchat.py
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, hoxily, r.david.murray, tim.peters, vstinner, zach.ware
Priority: normal Keywords:

Created on 2014-07-24 14:46 by hoxily, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg223842 - (view) Author: Hoxily (hoxily) Date: 2014-07-24 14:46
refer to  http://hg.python.org/cpython/file/5d70ac83d104/Lib/asynchat.py#l123
msg223851 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-07-24 15:39
So you are saying that that if will never trigger and can be deleted?
msg223857 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-07-24 16:34
Hoxily: It's best to spell out the bug you have found, preferably with an error/exception message and a way to reproduce it.

My best guess at the problem you're reporting (after looking at that line about 4 times) is that "bytes(str, self.encoding)" should be "bytes(data, self.encoding)" and you're getting an error message like "TypeError: encoding or errors without a string argument".  Is that correct?

Also, note that asynchat is deprecated, you would probably be better off using asyncio.
msg225995 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-08-27 15:47
Since Hoxily didn't reply the question, I suggest to close this issue as "not a bug" since we don't have enough information to understand it.
msg225998 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-08-27 15:58
Since it is effectively a deprecated module, let's do that.
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66257
2014-08-27 15:58:01r.david.murraysetstatus: open -> closed
resolution: works for me
messages: + msg225998

stage: resolved
2014-08-27 15:47:49vstinnersetmessages: + msg225995
2014-07-24 16:35:06vstinnersetnosy: + vstinner
2014-07-24 16:34:21zach.waresetnosy: + zach.ware

messages: + msg223857
versions: + Python 3.5
2014-07-24 15:39:20r.david.murraysetnosy: + r.david.murray
messages: + msg223851
2014-07-24 14:52:11hoxilysethgrepos: - hgrepo265
2014-07-24 14:46:50hoxilycreate