… 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>tags/v0.18.0
| @@ -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( | |||