The problem seems to be solved with
import io pd.read_csv(io.BytesIO(file.read()), encoding="cp1257")