Q:

AttributeError: 'socket' object has no attribute 'recive'

I have been working on a project with a raspberry pi. I'm trying to communicate between the laptop and the raspberry pi using sockets.
I was trying a youtube tutorial and keep getting this error 
Traceback (most recent call last):
  File "", line 1, in 
    s.recive(1024)
AttributeError: 'socket' object has no attribute 'recive'
after failing to run the script I tried typing the code line by line on python shell 
import socket
socket.recv(1024)
but still getting the same error
Can anyone explain whats the problem?

A:

Mind first reading the api and examples?
The correct syntax is buffer = socket.recv(1024)
as noted at socket — Low-level networking interface
But also it seems you are missing other basic flow, like the fact that you have to create the connection first.
Take some time first reading examples of the right use of sockets and then start coding.
A good start would be TutorialsPoint - Python 3 - Network Programming

