In Admin: build_attrs() got an unexpected keyword argument
See original GitHub issuePython 3.6.1 - Django 1.11 - Windows 10 - Package version: 1.3.3
I’m not really sure what’s going on, but whenever I try to open an object in my admin panel, I get the following error:
TypeError at /admin/Events/event/17/change/ build_attrs() got an unexpected keyword argument 'name'
Exception is located at:
C:\Users\Adam\Envs\otherlane_2\lib\site-packages\sortedm2m\forms.py in build_attrs, line 35
This is the start of the function. This last line seems to be the issue:
def render(self, name, value, attrs=None, choices=()):
if value is None: value = []
has_id = attrs and 'id' in attrs
final_attrs = self.build_attrs(attrs, name=name)
It seems CKEditor had a similar problem and had to undergo a revision: https://github.com/django-ckeditor/django-ckeditor/pull/364/files
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
TypeError build_attrs() got an unexpected keyword argument ...
Finally I found the fix-answer. In my widgets I had to change the code as below: local_attrs=self.attrs local_attrs['id'] = self.year_field ...
Read more >build_attrs() got an unexpected keyword argument 'name' #52
build_attrs() got an unexpected keyword argument 'name' #52 ... There is an issue with name parameter in Django=1.11.x because build_attrs method does not ......
Read more >Django/Ckeditor Erro Build_Attrs() Got An ... - ADocLib
In Admin: buildattrs() got an unexpected keyword argument #107 It seems CKEditor had a similar problem and had to undergo a revision: buildattrs ......
Read more >TypeError build_attrs() got an unexpected keyword argument ...
Coding example for the question TypeError build_attrs() got an unexpected keyword argument 'id' in django-django.
Read more >[Solved] __Init__() got an unexpected keyword argument 'attris'
I searched google and most common response I got was: attrs is not an argument to the field, it's an argument to the...
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 Free
Top 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
Hey, thank you all for the reports, comments and contributions! I just merged #104 and released 1.4.0 including a fix for this. Can you please test and confirm that this also fixes this issue?
Confirmed that this resolves the issue for me. Thank you kindly for your excellent work!