`TypeError: not a string` after pressing to special characters use delete
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 39.5k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
今天(2023年6月29日)星期几为星期四。
USER: 而且4月6号是 星期四 # --> 是{ }星, here is not space, after pressing to special characters use delete, throws an error
│ py:316 in _EncodeAsPieces │
│ │
│ 313 │ │ return _sentencepiece.SentencePieceProcessor__EncodeAsIds(self, text, enable_sam │
│ 314 │ │
│ 315 │ def _EncodeAsPieces(self, text, enable_sampling, nbest_size, alpha, add_bos, add_eos │
│ ❱ 316 │ │ return _sentencepiece.SentencePieceProcessor__EncodeAsPieces(self, text, enable_ │
│ 317 │ │
│ 318 │ def _EncodeAsSerializedProto(self, text, enable_sampling, nbest_size, alpha, add_bos │
│ 319 │ │ return _sentencepiece.SentencePieceProcessor__EncodeAsSerializedProto(self, text │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: not a string
After pressing to special characters use delete, throws an error.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported deletion action with the provided Chinese text, then start at the _EncodeAsPieces call shown in the py:316 stack trace. Trace the value passed to SentencePiece and verify that deleting after special characters no longer raises TypeError: not a string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100