Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: attribute name must be string, not 'int' #60

Open
nabeenb opened this issue Aug 2, 2024 · 2 comments
Open

TypeError: attribute name must be string, not 'int' #60

nabeenb opened this issue Aug 2, 2024 · 2 comments

Comments

@nabeenb
Copy link

nabeenb commented Aug 2, 2024

Python version = 3.11.8
pymongo = 4.5
2024-08-02T04:29:53.748307147Z File "/tmp/8dcb2a9152dfc2b/antenv/lib/python3.11/site-packages/log4mongo/handlers.py", line 244, in emit
2024-08-02T04:29:53.748310947Z if len(self.buffer) >= self.buffer_size or record.levelno >= getattr(logging, self.buffer_early_flush_level):
2024-08-02T04:29:53.748315147Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-02T04:29:53.748319347Z TypeError: attribute name must be string, not 'int'

Same code works on Python version 3.11.4 locally, but in Azure it's failing.

@nabeenb
Copy link
Author

nabeenb commented Aug 12, 2024

log4jmongo version = 1.8.1
Python version = 3.11.8
pymongo = 4.5
While logging to MongoDB via BufferedMongoHandler, get error all time TypeError: attribute name must be string, not 'int'

@oz123
Copy link
Collaborator

oz123 commented Aug 12, 2024

Hi,

Can you try and figure more ? What are the message you are logging?
Does it work with the non buffered handler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants