J
J
Jordan_Belforts2021-07-12 20:30:05
Python
Jordan_Belforts, 2021-07-12 20:30:05

Why does it crash with serialization error?

Hello) I ran into a problem and I can not understand what exactly is wrong. Googling the error, I found several options, but I could not impose solutions on my situation. In some answers, it was written that () were missing somewhere, but everything is ok with me.
I see an error in the trace

future: <Task finished coro=<Dispatcher._process_polling_updates() done, defined at /Users/glukhovsergey/Python/tempmail/venv/lib/python3.7/site-packages/aiogram/dispatcher/dispatcher.py:409> exception=TypeError('Object of type method is not JSON serializable')>


Based on the trace, the error is here
response = requests.post(self.root_url + self.accounts, proxies=current_proxy, auth=auth, json=account).json()


The whole trace is here -> https://gist.github.com/Glukhoff/b9351c28f1a514f38...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-07-12
@Jordan_Belforts

It looks like the name account is not associated with a dictionary, but with a method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question