title: How to fix OSError: b'Error opening adapter: Cannot find specified device. (20)'
body: <p>i'm trying to run this simple python code just to start learning how a sniffer works, but i get this constant error:</p>
  <p>OSError: b'Error opening adapter: Cannot find specified device.  (20)'</p>
  <p>Please note that the &quot;Cannot find specified device&quot; was in my language, and i translated in english, so it might be a little bit different. The code that i'm trying to run is:</p>
  <pre><code>import scapy.all as scapy
  
  def process_packet(packet):
      print(packet)
  
  def sniffing(interface):
      scapy.sniff(iface=interface, store=False, prn=process_packet)
  
  
  sniffing('Wi-Fi')
  </code></pre>
  <p>The video i watched is here:
  <a href="https://www.youtube.com/watch?v=rI0rTpH0f1o" rel="nofollow noreferrer">https://www.youtube.com/watch?v=rI0rTpH0f1o</a></p>
  <p>Thank you for your time. If you need the original error (in my language) please post a comment and i'll write it.</p>