I am working on this code
from socket import * HOST = 'localhost' PORT = 21567 BUFSIZ = 1024 ADDR = (HOST, PORT) serversock = socket(AF_INET, SOCK_STREAM) serversock.bind(ADDR) serversock.listen(2) while 1: print ("waiting on connection") clientsock, addr = serversock.accept() print ('connected from:', addr) while 1: data = clientsock.recv(1024).decode() if not data: break clientsock.send(data.encode()) clientsock.close() serversock.close()
I get this error:
OSError: [WinError 10038] an operation was attempted on something that is not a so
Related Posts:
- gaierror: [Errno 8] nodename nor servname provided, or not known (with macOS Sierra)
- Python [Errno 98] Address already in use
- Error: nodename nor servname provided, or not known (python sockets)
- gaierror: [Errno 8] nodename nor servname provided, or not known (with macOS Sierra)
- What does socket binding mean?
- Python socket.error: [Errno 111] Connection refused
- Sending string via socket (python)
- Getting “socket.error: [Errno 61] Connection refused” python paramiko
- Errno 10061 : No connection could be made because the target machine actively refused it ( client – server )
- How to set timeout on python’s socket recv method?
- Python Socket Receive Large Amount of Data
- UDP Client/Server Socket in Python
- Handling a timeout error in python sockets
- How do I lowercase a string in Python?
- Difference between del, remove, and pop on lists
- How to use the pass statement
- python base64 to hex
- What’s the canonical way to check for type in Python?
- IndexError: tuple index out of range —– Python
- What is the pythonic way to calculate dot product?
- How to resize an image with OpenCV2.0 and Python2.6
- Is there a ‘foreach’ function in Python 3?
- How to condense if/else into one line in Python?
- Depth-first search (DFS) code in python
- How to use Python to execute a cURL command?
- What does %s mean in a python format string?
- Redirecting to URL in Flask
- Why KeyError: 0
- bash: pip: command not found
- How do I concatenate two lists in Python?
- Convert a tensor to numpy array in Tensorflow?
- How to run Conda?
- How do I check whether a file exists without exceptions?
- How can I get dictionary key as variable directly in Python (not by searching from value)?
- pygame.error: video system not initialized
- Python – Reading and writing csv files with utf-8 encoding
- Python’s equivalent of && (logical-and) in an if-statement
- Replace values in list using Python
- Trouble updating to Anaconda Navigator 1.10.0 (MacOS)
- Binary numbers in Python
- Django: ImproperlyConfigured: The SECRET_KEY setting must not be empty
- builtins.TypeError: must be str, not bytes
- Remove all occurrences of a value from a list?
- os.path.dirname(__file__) returns empty
- keyerror 1 in my code
- ‘NoneType’ object has no attribute ‘group’
- How to fix ‘ValueError: list.remove(x): x not in list’ error in Python
- Group by index + column in pandas
- Why am I getting a FileNotFoundError?
- Anaconda Navigator won’t launch (windows 10)
- What are all possible pos tags of NLTK?
- What is the difference between ‘/’ and ‘//’ when used for division?
- How do I format a string using a dictionary in python-3.x?
- How to extend a class in python?
- Converting XML to JSON using Python?
- Django – no such table exception
- How to import a module given the full path?
- Why does “pip install” inside Python raise a SyntaxError?
- Removing numbers from string
- importing external “.txt” file in python
- How can I remove Nan from list Python/NumPy
- How to implement a binary search tree in Python?
- Writing string to a file on a new line every time
- examining items in a python Queue
- What’s the difference between scikit-learn and tensorflow? Is it possible to use them together?
- Multiple try codes in one block
- Error: Segmentation fault (core dumped)
- Python: “TypeError: __str__ returned non-string” but still prints to output?
- ImportError: No module named ‘django.core.urlresolvers’
- Numpy, multiply array with scalar
- Python 3: Multiply a vector by a matrix without NumPy
- How to fix “Can’t find a default Python” error
- TypeError: ‘newline’ is an invalid keyword argument for this function
- datetime to string with series in pandas
- Is it possible only to declare a variable without assigning any value in Python?
- How to Install pip for python 3.7 on Ubuntu 18?
- How to add a new row to an empty numpy array
- Logical indexing with lists
- Change the name of a key in dictionary
- Check if an object exists
- How do I calculate the date six months from the current date using the datetime Python module?
- How to embed image or picture in jupyter notebook, either from a local machine or from a web resource?
- How to make a python script wait for a pressed key?
- TypeError: Image data can not convert to float
- Mean Squared Error in Numpy?
- Turn a single number into single digits Python
- Is there a head and tail method for Numpy array?
- What should I use to open a url instead of urlopen in urllib3
- Logical operators for Boolean indexing in Pandas
- Transposing a 1D NumPy array
- Explaining Python’s ‘__enter__’ and ‘__exit__’
- numpy.float64 object is not iterable…but I’m NOT trying to
- Converting a list to a set changes element order
- Create a list with initial capacity in Python
- Accessing dict_keys element by index in Python3
- How to update Pandas from Anaconda and is it possible to use eclipse with this last
- Does python support character type?
- Styling multi-line conditions in ‘if’ statements?
- What is related_name used for?
- Symbol not found: __PyCodecInfo_GetIncrementalDecoder