title: ValueError: non-hexadecimal number found in fromhex() arg at position
body: <p>I have a hexadecimal string  </p>
  
  <pre><code>hexDecoded = '0xa506f7374696e6720446174653a204a756c792031322c2032303038205b45426f6f6b20233238395d0a52656c6561736520446174653a204a756c792c20313939350a5b4c61737420757064617465643a204a616e756172792031332c20323031325d0a0a0a4c616e67756167653a20456e676c6973680a0a0a2a2a2a205354'
  </code></pre>
  
  <p>On trying to obtain text as  </p>
  
  <pre><code>text = bytearray.fromhex(hexDecoded.lstrip('0x')).decode()
  </code></pre>
  
  <p>I get the error  </p>
  
  <p><strong>ValueError: non-hexadecimal number found in fromhex() arg at position 255</strong></p>
  
  <p>I can't understand why the code is looking at postion 255 in the hexadecimal string when the length of stripped hexadecimal string is only 255.  </p>
  
  <p>Any ideas what is missing here.  </p>
  
  <p>Thanks for help</p>