Skip to content

Commit

Permalink
fix bug for utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
lgqfhwy committed Dec 19, 2023
1 parent c31ae3c commit e9fc1cc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions easy_rec/python/input/odps_input_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def _odps_read(self):
second_split)
if one_data[col_id] not in ['', 'NULL', None]:
batch_data_np[col_id][row_id] = one_data[col_id]
print('here0, batch_data_np = ', batch_data_np)
one_data[col_id] = one_data[col_id].decode('utf-8')
batch_data_np[col_id][row_id] = one_data[col_id]
print('here1, batch_data_np = ', batch_data_np)
print('batch_data_np = ', batch_data_np)
yield tuple(batch_data_np)
if res_num > 0:
Expand All @@ -109,6 +113,10 @@ def _odps_read(self):
second_split)
if one_data[col_id] not in ['', 'NULL', None]:
batch_data_np[col_id][row_id] = one_data[col_id]
print('here00, batch_data_np = ', batch_data_np)
one_data[col_id] = one_data[col_id].decode('utf-8')
batch_data_np[col_id][row_id] = one_data[col_id]
print('here11, batch_data_np = ', batch_data_np)
print('batch_data_np = ', batch_data_np)
yield tuple(batch_data_np)
reader.close()
Expand Down

0 comments on commit e9fc1cc

Please sign in to comment.