title: Python Import issues: AttributeError: 'NoneType' object has no attribute 'fields'
body: <p>I'm trying to write a little python script on Linux Embedded with scapy lib. 
  On my OsX or Linux box i don't have any problem to do something like this:</p>
  
  <pre><code>from scapy.all import IP, sniff
  from scapy.layers import http
  import urllib, re
  
  def process_tcp_packet(packet):
  
      http_layer = packet.getlayer(http.HTTPRequest)
      ip_layer = packet.getlayer(IP)
      url = str('{1[Path]}'.format(ip_layer.fields, http_layer.fields))
      if url:
          url = urllib.unquote(url).decode('utf8')
          print re.findall(r'(https?://\S+lh1)', url)
  
  
  sniff(filter="tcp and host hostexample.com", prn=process_tcp_packet)
  </code></pre>
  
  <p>The Scapy folder looks like this:</p>
  
  <pre><code>enter code here
  /scapy
    __init__.py
    all.py
    ...
    /layers
     __init__.py
     http.py
     dhcp.py
     ...
  </code></pre>
  
  <p>When i start the script, it seems that all modules are imported but the line:</p>
  
  <pre><code>url = str('{1[Path]}'.format(ip_layer.fields, http_layer.fields))
  </code></pre>
  
  <p>Return the error:</p>
  
  <pre><code>AttributeError: 'NoneType' object has no attribute 'fields'
  --&gt;End of Python script error report&lt;--
  </code></pre>
  
  <p>Any help will be appreciated!
  Thanks!</p>