Skip to content

fix: decode before format to json - #10506

Merged
KevinHuSh merged 1 commit into
infiniflow:mainfrom
Lynn-Inf:fix/bytes-decode
Oct 13, 2025
Merged

KevinHuSh merged 1 commit into
infiniflow:mainfrom
Lynn-Inf:fix/bytes-decode

Conversation

@Lynn-Inf

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Decode bytes before format to json.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Oct 13, 2025
@Lynn-Inf Lynn-Inf added the ci Continue Integration label Oct 13, 2025
@KevinHuSh
KevinHuSh merged commit 7fb8b30 into infiniflow:main Oct 13, 2025
yngvarhuang pushed a commit to yngvarhuang/ragflow that referenced this pull request Oct 13, 2025
* main: (36 commits)
  Feat: Merge title splitter and token splitter into chunker category infiniflow#9869 (infiniflow#10517)
  Fix: Optimized the login page and fixed some known issues. infiniflow#9869 (infiniflow#10514)
  Fix: The Context Generator(Transformer) node can only be followed by a Tokenizer(Indexer) and a Context Generator(Transformer). infiniflow#9869 (infiniflow#10515)
  Fix: Update lm studio models support, refer to infiniflow#8116 (infiniflow#10509)
  Feat: add trino support (infiniflow#10512)
  Fix: maintain backward compatibility for KB tasks (infiniflow#10508)
  fix: decode before format to json (infiniflow#10506)
  Feat: Modify the background color of the canvas infiniflow#9869 (infiniflow#10507)
  Fix: Mcp reset error, infiniflow#10497 (infiniflow#10498)
  Feat: ​​OpenSearch's support for newly embedding models​​ (infiniflow#10494)
  Fix: remove lang for autio. (infiniflow#10496)
  Fix: incorrect agent template infiniflow#10393 (infiniflow#10491)
  Feat: add support for multi-column PDF parsing (infiniflow#10475)
  Fix: Added table of contents extraction functionality and optimized form item layout infiniflow#9869 (infiniflow#10492)
  Feat: Modify the default style of the agent node anchor infiniflow#9869 (infiniflow#10489)
  Feat: debugging toc part. (infiniflow#10486)
  Feat:  include author, journal name, volume, issue, page, and DOI in PubMed search results (infiniflow#10481)
  feat(login): Refactor the login page and add dynamic background and highlight effects infiniflow#9869 (infiniflow#10482)
  Fix: Fixed the issue where the connection lines of placeholder nodes in the agent canvas could not be displayed infiniflow#9869 (infiniflow#10485)
  Fix: Disable reasoning on Gemini 2.5 Flash by default (infiniflow#10477)
  ...
clifftseng pushed a commit to clifftseng/ragflow that referenced this pull request Feb 9, 2026
### What problem does this PR solve?

Decode bytes before format to json.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
JessYanCoding added a commit to JessYanCoding/ragflow that referenced this pull request Sep 14, 2026
Two regressions in Parser._email, the first masking the second.

_add_content recurses correctly but both leaf branches read the enclosing
msg instead of their own `m` parameter. get_payload(decode=True) on a
multipart container returns None, so None.decode(charset) raised
AttributeError for every multipart message -- including a plain+HTML mail
with no attachment. Single-part messages worked only because there msg is
the part. 061d8f7 (infiniflow#10901) introduced this while copying in the charset
fallback chain; the code it replaced read `m`.

Attachments were then force-decoded with part.get_content_charset(),
which is None for any binary part, and with a hardcoded utf-8 in the .msg
branch. Both raise. 7fb8b30 (infiniflow#10506) introduced both call sites; the
.msg line it replaced was annotated `# binary`. Attachments are in the
shipped default field list, so this was the default configuration.

Text attachments now go through the charset fallback chain infiniflow#10920 added
for rag/app/email.py, lifted to a method-level helper so the body and
attachment paths share it. Binary attachments keep their filename and
contribute no payload text; re-parsing their content by extension, as
rag/app/email.py and the Go parser both do, is infiniflow#6560 and out of scope.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants