core: make sure base_data is bytes or Pdata

This was working fine (although not python3 ready), but was not tested
in 0 seconds, using 0 compute credits, and was queued for 0 seconds