My sample code will be like this
import numpy as np
from io import BytesIO
data = "1, 2, 3\n4, 5, 6"
np.genfromtxt(data, delimiter=",")
while run this code throws error
Traceback (most recent call last): File "", line 1, in TypeError: a bytes-like object is required, not 'str'