New submission from Nick McElwaine:
import socket # Import socket module
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(hostname,port) # this works
message = 'text'
s.sendall(message) TypeError: a bytes-like object is required, not 'str'
s.sendall(message)
TypeError: a bytes-like object is required, not 'str'
----------
components: Extension Modules
messages: 266102
nosy: Dhruve
priority: normal
severity: normal
status: open
title: unable to use socket send and sendall due to type error
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27087>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com