mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-21 13:40:00 +08:00
fix bug chunking:expected string or bytes-like object (#7116)
… bytes-like object ### What problem does this PR solve? fix bug #6990 internal server error ehile chunking:expected string or bytes-like object _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): Co-authored-by: unknown <taoshi.ln@chinatelecom.cn>
This commit is contained in:
parent
b1798bafb0
commit
1b4016317e
@ -193,6 +193,9 @@ def chunk(filename, binary=None, from_page=0, to_page=10000000000,
|
||||
if n in df.columns:
|
||||
del df[n]
|
||||
clmns = df.columns.values
|
||||
if len(clmns) != len(set(clmns)):
|
||||
duplicates = [col for col in clmns if list(clmns).count(col) > 1]
|
||||
raise ValueError(f"Duplicate column names detected: {set(duplicates)}")
|
||||
txts = list(copy.deepcopy(clmns))
|
||||
py_clmns = [
|
||||
PY.get_pinyins(
|
||||
|
Loading…
x
Reference in New Issue
Block a user