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: 'bytes' object is not callable #41

Open
sachinomniquad opened this issue Jul 16, 2021 · 1 comment
Open

TypeError: 'bytes' object is not callable #41

sachinomniquad opened this issue Jul 16, 2021 · 1 comment

Comments

@sachinomniquad
Copy link

for some of the emails i get below error

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pymilter-1.0.5-py3.8-linux-x86_64.egg/Milter/init.py", line 854, in
milter.set_body_callback(lambda ctx,chunk: ctx.getpriv().body(chunk))
TypeError: 'bytes' object is not callable

@sdgathman
Copy link
Owner

Does your milter by any chance do something like this:

self.body = some_bytes_object

That would produce exactly the result described. My milters use self.fp and self.body_start.
self.body() is a callback function that you override to get the body bytes.

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