TypeError: get_sort_key() missing 1 required positional argument: 'ctx'
See original GitHub issueWhat this might mean? I have no idea how to fix this. Or is it a bug in the peewee
code?
File "/Users/Vic/projects/brain2/brain/utils/reports/bi.py", line 449, in sync_author_tasks
BIAuthorTask.insert_many(author_tasks).on_conflict_replace().execute()
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 1560, in inner
return method(self, database, *args, **kwargs)
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 1631, in execute
return self._execute(database)
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 2274, in _execute
return super(Insert, self)._execute(database)
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 2049, in _execute
cursor = database.execute(self)
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 2637, in execute
sql, params = ctx.sql(query).query()
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 549, in sql
return obj.__sql__(self)
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 2258, in __sql__
self._generate_insert(self._insert, ctx)
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 2181, in _generate_insert
columns = sorted(accum, key=lambda obj: obj.get_sort_key(ctx))
File "/Users/Vic/projects/brain2/venv/lib/python3.6/site-packages/peewee.py", line 2181, in <lambda>
columns = sorted(accum, key=lambda obj: obj.get_sort_key(ctx))
TypeError: get_sort_key() missing 1 required positional argument: 'ctx'
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
missing 1 required positional argument: 'ctx' - Stack Overflow
The function on_ready is defined twice and the first one is eliminated when the second one is defined. The error is telling you...
Read more >I am missing 1 required positional argument: (coro) in discord ...
What and where is the object created in the client class in discord.py? Missing 1 required positional argument pygame 1.9.6 Python 3.8.1.
Read more >Help pls : r/Discord_Bots - Reddit
I have this code: @bot.event async def on_message(self, ctx, ... it says:TypeError: on_message() missing 1 required positional argument: ...
Read more >Custom function missing argument - PyTorch Forums
The previous code gives me TypeError: forward() missing 1 required positional argument: 'target' . This seems to happen because it takes ctx ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, the model contained a bad attribute:
2.10.2 detected this, while 3.5.2 showed this error. After I added the parens, it worked.
Should I close this issue?
Whoo that was a fun 2 hrs trying to figure out what was wrong – I was missing the parens after IntegerField
Is there an easier way to detect this issue in the future?