question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In Admin: build_attrs() got an unexpected keyword argument

See original GitHub issue

Python 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:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
gregmuelleggercommented, Jun 8, 2017

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?

0reactions
astarrhcommented, Jun 12, 2017

Confirmed that this resolves the issue for me. Thank you kindly for your excellent work!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found