title: How to fix issue of dpkt not being able to decode .pcap file
body: <p>I am having issues running this code on my machine, but it works fine on my schools linux machines.  </p>
  
  <p>The error i am getting is:  </p>
  
  <pre><code>Traceback (most recent call last):  
  File "wireshark_02.py", line 74, in &lt;module&gt;   
      main()  
    File "wireshark_02.py", line 43, in main  
   input_data = dpkt.pcap.Reader(open(file_name,'r'))  
    File "C:\Users\Slava\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dpkt\pcap.py", line 244, in __init__    
      buf = self.__f.read(FileHdr.__hdr_len__)  
    File "C:\Users\Slava\AppData\Local\Programs\Python\Python36- 
   32\lib\encodings\cp1252.py", line 23, in decode    
      return codecs.charmap_decode(input,self.errors,decoding_table)[0]   
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position
  125: character maps to &lt;undefined&gt;    
  </code></pre>
  
  <p>I've installed dpkt running pip install dpkt.</p>
  
  <p>Is there anything i can do to make this work on my machine or do i need to use my schools computers?</p>