Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

FluentRecordFormatter._structuring may raise AttributeError

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
observability

Research direction

Start at FluentRecordFormatter._structuring and reproduce the failure by attaching a fluent handler, then calling logger.info('1'). Confirm the behavior for JSON scalars and lists, and consider the issue done when these messages no longer raise AttributeError while dictionary messages continue to work.

Written by the indexing model from the issue text.

Description

json.loads(str(msg)) may not return a dict, it can return:

  • int if msg is a json dumped from an int, for example msg = '123'
  • list if msg is a json dumped from a list, for example msg = '["s", "1"]'

Only dict have items() method.

So if you get a logger and add a fluent.handler to it, then you execute
logger.info('1')
you will get an AttributeError

Dominant language
Python
Stars
457
Forks
138
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fluent/fluent-logger-python

All issues in fluent/fluent-logger-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.