We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ImproperlyConfigured: Field name `language` is not valid for model `Profile`.
Sentry Issue: [CONCREXIT-8J](https://sentry.io/organizations/thalia/issues/2580014551/?referrer=github_integration)

```
ImproperlyConfigured: Field name `language` is not valid for model `Profile`.
(14 additional frame(s) were not displayed)
...
  File "django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "rest_framework/serializers.py", line 349, in fields
    for key, value in self.get_fields().items():
  File "rest_framework/serializers.py", line 1053, in get_fields
    field_class, field_kwargs = self.build_field(
  File "rest_framework/serializers.py", line 1199, in build_field
    return self.build_unknown_field(field_name, model_class)
  File "rest_framework/serializers.py", line 1317, in build_unknown_field
    raise ImproperlyConfigured(
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `website/members/api/v1/serializers.py`
Content:
```
1 """DRF serializers defined by the members package."""
2 from django.templatetags.static import static
3 from rest_framework import serializers
4 
5 from members.models import Member, Profile
6 from members.services import member_achievements, member_societies
7 from thaliawebsite.api.services import create_image_thumbnail_dict
8 
9 
10 class ProfileRetrieveSerializer(serializers.ModelSerializer):
11     """Serializer that renders a member profile."""
12 
13     class Meta:
14         model = Profile
15         fields = (
16             "pk",
17             "display_name",
18             "avatar",
19             "profile_description",
20             "birthday",
21             "starting_year",
22             "programme",
23             "website",
24             "membership_type",
25             "achievements",
26             "societies",
27         )
28 
29     pk = serializers.SerializerMethodField("_pk")
30     avatar = serializers.SerializerMethodField("_avatar")
31     birthday = serializers.SerializerMethodField("_birthday")
32     membership_type = serializers.SerializerMethodField("_membership_type")
33     achievements = serializers.SerializerMethodField("_achievements")
34     societies = serializers.SerializerMethodField("_societies")
35 
36     def _pk(self, instance):
37         return instance.user.pk
38 
39     def _birthday(self, instance):
40         if instance.show_birthday:
41             return instance.birthday
42         return None
43 
44     def _membership_type(self, instance):
45         membership = instance.user.current_membership
46         if membership:
47             return membership.type
48         return None
49 
50     def _achievements(self, instance):
51         return member_achievements(instance.user)
52 
53     def _societies(self, instance):
54         return member_societies(instance.user)
55 
56     def _avatar(self, instance):
57         placeholder = self.context["request"].build_absolute_uri(
58             static("members/images/default-avatar.jpg")
59         )
60         file = None
61         if instance.photo:
62             file = instance.photo
63         return create_image_thumbnail_dict(
64             self.context["request"], file, placeholder=placeholder, size_large="800x800"
65         )
66 
67 
68 class MemberListSerializer(serializers.ModelSerializer):
69     """Serializer that renders a list of members."""
70 
71     class Meta:
72         model = Member
73         fields = ("pk", "starting_year", "display_name", "membership_type", "avatar")
74 
75     display_name = serializers.SerializerMethodField("_display_name")
76     starting_year = serializers.SerializerMethodField("_starting_year")
77     avatar = serializers.SerializerMethodField("_avatar")
78     membership_type = serializers.SerializerMethodField("_membership_type")
79 
80     def _display_name(self, instance):
81         return instance.profile.display_name()
82 
83     def _starting_year(self, instance):
84         return instance.profile.starting_year
85 
86     def _avatar(self, instance):
87         placeholder = self.context["request"].build_absolute_uri(
88             static("members/images/default-avatar.jpg")
89         )
90         file = None
91         if instance.profile.photo:
92             file = instance.profile.photo
93         return create_image_thumbnail_dict(
94             self.context["request"], file, placeholder=placeholder, size_large="800x800"
95         )
96 
97     def _membership_type(self, instance):
98         membership = instance.current_membership
99         if membership:
100             return membership.type
101         return None
102 
103 
104 class ProfileEditSerializer(serializers.ModelSerializer):
105     """Serializer that renders a profile to be edited."""
106 
107     class Meta:
108         model = Profile
109         fields = (
110             "pk",
111             "email",
112             "first_name",
113             "last_name",
114             "address_street",
115             "address_street2",
116             "address_postal_code",
117             "address_city",
118             "address_country",
119             "phone_number",
120             "show_birthday",
121             "website",
122             "photo",
123             "emergency_contact",
124             "emergency_contact_phone_number",
125             "profile_description",
126             "nickname",
127             "display_name_preference",
128             "language",
129             "receive_optin",
130             "receive_newsletter",
131             "receive_magazine",
132             "display_name",
133             "avatar",
134             "birthday",
135             "starting_year",
136             "programme",
137             "membership_type",
138             "achievements",
139             "societies",
140         )
141 
142         read_only_fields = ("display_name", "starting_year", "programme", "birthday")
143 
144     pk = serializers.SerializerMethodField("_pk")
145     email = serializers.SerializerMethodField("_email")
146     first_name = serializers.SerializerMethodField("_first_name")
147     last_name = serializers.SerializerMethodField("_last_name")
148     avatar = serializers.SerializerMethodField("_avatar")
149     membership_type = serializers.SerializerMethodField("_membership_type")
150     achievements = serializers.SerializerMethodField("_achievements")
151     societies = serializers.SerializerMethodField("_societies")
152 
153     def _pk(self, instance):
154         return instance.user.pk
155 
156     def _email(self, instance):
157         return instance.user.email
158 
159     def _first_name(self, instance):
160         return instance.user.first_name
161 
162     def _last_name(self, instance):
163         return instance.user.last_name
164 
165     def _membership_type(self, instance):
166         membership = instance.user.current_membership
167         if membership:
168             return membership.type
169         return None
170 
171     def _achievements(self, instance):
172         return member_achievements(instance.user)
173 
174     def _societies(self, instance):
175         return member_societies(instance.user)
176 
177     def _avatar(self, instance):
178         placeholder = self.context["request"].build_absolute_uri(
179             static("members/images/default-avatar.jpg")
180         )
181         file = None
182         if instance.photo:
183             file = instance.photo
184         return create_image_thumbnail_dict(
185             self.context["request"], file, placeholder=placeholder, size_large="800x800"
186         )
187
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/website/members/api/v1/serializers.py b/website/members/api/v1/serializers.py
--- a/website/members/api/v1/serializers.py
+++ b/website/members/api/v1/serializers.py
@@ -125,7 +125,6 @@
             "profile_description",
             "nickname",
             "display_name_preference",
-            "language",
             "receive_optin",
             "receive_newsletter",
             "receive_magazine",

{"golden_diff": "diff --git a/website/members/api/v1/serializers.py b/website/members/api/v1/serializers.py\n--- a/website/members/api/v1/serializers.py\n+++ b/website/members/api/v1/serializers.py\n@@ -125,7 +125,6 @@\n             \"profile_description\",\n             \"nickname\",\n             \"display_name_preference\",\n-            \"language\",\n             \"receive_optin\",\n             \"receive_newsletter\",\n             \"receive_magazine\",\n", "issue": "ImproperlyConfigured: Field name `language` is not valid for model `Profile`.\nSentry Issue: [CONCREXIT-8J](https://sentry.io/organizations/thalia/issues/2580014551/?referrer=github_integration)\n\n```\nImproperlyConfigured: Field name `language` is not valid for model `Profile`.\n(14 additional frame(s) were not displayed)\n...\n  File \"django/utils/functional.py\", line 48, in __get__\n    res = instance.__dict__[self.name] = self.func(instance)\n  File \"rest_framework/serializers.py\", line 349, in fields\n    for key, value in self.get_fields().items():\n  File \"rest_framework/serializers.py\", line 1053, in get_fields\n    field_class, field_kwargs = self.build_field(\n  File \"rest_framework/serializers.py\", line 1199, in build_field\n    return self.build_unknown_field(field_name, model_class)\n  File \"rest_framework/serializers.py\", line 1317, in build_unknown_field\n    raise ImproperlyConfigured(\n```\n", "before_files": [{"content": "\"\"\"DRF serializers defined by the members package.\"\"\"\nfrom django.templatetags.static import static\nfrom rest_framework import serializers\n\nfrom members.models import Member, Profile\nfrom members.services import member_achievements, member_societies\nfrom thaliawebsite.api.services import create_image_thumbnail_dict\n\n\nclass ProfileRetrieveSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer that renders a member profile.\"\"\"\n\n    class Meta:\n        model = Profile\n        fields = (\n            \"pk\",\n            \"display_name\",\n            \"avatar\",\n            \"profile_description\",\n            \"birthday\",\n            \"starting_year\",\n            \"programme\",\n            \"website\",\n            \"membership_type\",\n            \"achievements\",\n            \"societies\",\n        )\n\n    pk = serializers.SerializerMethodField(\"_pk\")\n    avatar = serializers.SerializerMethodField(\"_avatar\")\n    birthday = serializers.SerializerMethodField(\"_birthday\")\n    membership_type = serializers.SerializerMethodField(\"_membership_type\")\n    achievements = serializers.SerializerMethodField(\"_achievements\")\n    societies = serializers.SerializerMethodField(\"_societies\")\n\n    def _pk(self, instance):\n        return instance.user.pk\n\n    def _birthday(self, instance):\n        if instance.show_birthday:\n            return instance.birthday\n        return None\n\n    def _membership_type(self, instance):\n        membership = instance.user.current_membership\n        if membership:\n            return membership.type\n        return None\n\n    def _achievements(self, instance):\n        return member_achievements(instance.user)\n\n    def _societies(self, instance):\n        return member_societies(instance.user)\n\n    def _avatar(self, instance):\n        placeholder = self.context[\"request\"].build_absolute_uri(\n            static(\"members/images/default-avatar.jpg\")\n        )\n        file = None\n        if instance.photo:\n            file = instance.photo\n        return create_image_thumbnail_dict(\n            self.context[\"request\"], file, placeholder=placeholder, size_large=\"800x800\"\n        )\n\n\nclass MemberListSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer that renders a list of members.\"\"\"\n\n    class Meta:\n        model = Member\n        fields = (\"pk\", \"starting_year\", \"display_name\", \"membership_type\", \"avatar\")\n\n    display_name = serializers.SerializerMethodField(\"_display_name\")\n    starting_year = serializers.SerializerMethodField(\"_starting_year\")\n    avatar = serializers.SerializerMethodField(\"_avatar\")\n    membership_type = serializers.SerializerMethodField(\"_membership_type\")\n\n    def _display_name(self, instance):\n        return instance.profile.display_name()\n\n    def _starting_year(self, instance):\n        return instance.profile.starting_year\n\n    def _avatar(self, instance):\n        placeholder = self.context[\"request\"].build_absolute_uri(\n            static(\"members/images/default-avatar.jpg\")\n        )\n        file = None\n        if instance.profile.photo:\n            file = instance.profile.photo\n        return create_image_thumbnail_dict(\n            self.context[\"request\"], file, placeholder=placeholder, size_large=\"800x800\"\n        )\n\n    def _membership_type(self, instance):\n        membership = instance.current_membership\n        if membership:\n            return membership.type\n        return None\n\n\nclass ProfileEditSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer that renders a profile to be edited.\"\"\"\n\n    class Meta:\n        model = Profile\n        fields = (\n            \"pk\",\n            \"email\",\n            \"first_name\",\n            \"last_name\",\n            \"address_street\",\n            \"address_street2\",\n            \"address_postal_code\",\n            \"address_city\",\n            \"address_country\",\n            \"phone_number\",\n            \"show_birthday\",\n            \"website\",\n            \"photo\",\n            \"emergency_contact\",\n            \"emergency_contact_phone_number\",\n            \"profile_description\",\n            \"nickname\",\n            \"display_name_preference\",\n            \"language\",\n            \"receive_optin\",\n            \"receive_newsletter\",\n            \"receive_magazine\",\n            \"display_name\",\n            \"avatar\",\n            \"birthday\",\n            \"starting_year\",\n            \"programme\",\n            \"membership_type\",\n            \"achievements\",\n            \"societies\",\n        )\n\n        read_only_fields = (\"display_name\", \"starting_year\", \"programme\", \"birthday\")\n\n    pk = serializers.SerializerMethodField(\"_pk\")\n    email = serializers.SerializerMethodField(\"_email\")\n    first_name = serializers.SerializerMethodField(\"_first_name\")\n    last_name = serializers.SerializerMethodField(\"_last_name\")\n    avatar = serializers.SerializerMethodField(\"_avatar\")\n    membership_type = serializers.SerializerMethodField(\"_membership_type\")\n    achievements = serializers.SerializerMethodField(\"_achievements\")\n    societies = serializers.SerializerMethodField(\"_societies\")\n\n    def _pk(self, instance):\n        return instance.user.pk\n\n    def _email(self, instance):\n        return instance.user.email\n\n    def _first_name(self, instance):\n        return instance.user.first_name\n\n    def _last_name(self, instance):\n        return instance.user.last_name\n\n    def _membership_type(self, instance):\n        membership = instance.user.current_membership\n        if membership:\n            return membership.type\n        return None\n\n    def _achievements(self, instance):\n        return member_achievements(instance.user)\n\n    def _societies(self, instance):\n        return member_societies(instance.user)\n\n    def _avatar(self, instance):\n        placeholder = self.context[\"request\"].build_absolute_uri(\n            static(\"members/images/default-avatar.jpg\")\n        )\n        file = None\n        if instance.photo:\n            file = instance.photo\n        return create_image_thumbnail_dict(\n            self.context[\"request\"], file, placeholder=placeholder, size_large=\"800x800\"\n        )\n", "path": "website/members/api/v1/serializers.py"}], "after_files": [{"content": "\"\"\"DRF serializers defined by the members package.\"\"\"\nfrom django.templatetags.static import static\nfrom rest_framework import serializers\n\nfrom members.models import Member, Profile\nfrom members.services import member_achievements, member_societies\nfrom thaliawebsite.api.services import create_image_thumbnail_dict\n\n\nclass ProfileRetrieveSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer that renders a member profile.\"\"\"\n\n    class Meta:\n        model = Profile\n        fields = (\n            \"pk\",\n            \"display_name\",\n            \"avatar\",\n            \"profile_description\",\n            \"birthday\",\n            \"starting_year\",\n            \"programme\",\n            \"website\",\n            \"membership_type\",\n            \"achievements\",\n            \"societies\",\n        )\n\n    pk = serializers.SerializerMethodField(\"_pk\")\n    avatar = serializers.SerializerMethodField(\"_avatar\")\n    birthday = serializers.SerializerMethodField(\"_birthday\")\n    membership_type = serializers.SerializerMethodField(\"_membership_type\")\n    achievements = serializers.SerializerMethodField(\"_achievements\")\n    societies = serializers.SerializerMethodField(\"_societies\")\n\n    def _pk(self, instance):\n        return instance.user.pk\n\n    def _birthday(self, instance):\n        if instance.show_birthday:\n            return instance.birthday\n        return None\n\n    def _membership_type(self, instance):\n        membership = instance.user.current_membership\n        if membership:\n            return membership.type\n        return None\n\n    def _achievements(self, instance):\n        return member_achievements(instance.user)\n\n    def _societies(self, instance):\n        return member_societies(instance.user)\n\n    def _avatar(self, instance):\n        placeholder = self.context[\"request\"].build_absolute_uri(\n            static(\"members/images/default-avatar.jpg\")\n        )\n        file = None\n        if instance.photo:\n            file = instance.photo\n        return create_image_thumbnail_dict(\n            self.context[\"request\"], file, placeholder=placeholder, size_large=\"800x800\"\n        )\n\n\nclass MemberListSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer that renders a list of members.\"\"\"\n\n    class Meta:\n        model = Member\n        fields = (\"pk\", \"starting_year\", \"display_name\", \"membership_type\", \"avatar\")\n\n    display_name = serializers.SerializerMethodField(\"_display_name\")\n    starting_year = serializers.SerializerMethodField(\"_starting_year\")\n    avatar = serializers.SerializerMethodField(\"_avatar\")\n    membership_type = serializers.SerializerMethodField(\"_membership_type\")\n\n    def _display_name(self, instance):\n        return instance.profile.display_name()\n\n    def _starting_year(self, instance):\n        return instance.profile.starting_year\n\n    def _avatar(self, instance):\n        placeholder = self.context[\"request\"].build_absolute_uri(\n            static(\"members/images/default-avatar.jpg\")\n        )\n        file = None\n        if instance.profile.photo:\n            file = instance.profile.photo\n        return create_image_thumbnail_dict(\n            self.context[\"request\"], file, placeholder=placeholder, size_large=\"800x800\"\n        )\n\n    def _membership_type(self, instance):\n        membership = instance.current_membership\n        if membership:\n            return membership.type\n        return None\n\n\nclass ProfileEditSerializer(serializers.ModelSerializer):\n    \"\"\"Serializer that renders a profile to be edited.\"\"\"\n\n    class Meta:\n        model = Profile\n        fields = (\n            \"pk\",\n            \"email\",\n            \"first_name\",\n            \"last_name\",\n            \"address_street\",\n            \"address_street2\",\n            \"address_postal_code\",\n            \"address_city\",\n            \"address_country\",\n            \"phone_number\",\n            \"show_birthday\",\n            \"website\",\n            \"photo\",\n            \"emergency_contact\",\n            \"emergency_contact_phone_number\",\n            \"profile_description\",\n            \"nickname\",\n            \"display_name_preference\",\n            \"receive_optin\",\n            \"receive_newsletter\",\n            \"receive_magazine\",\n            \"display_name\",\n            \"avatar\",\n            \"birthday\",\n            \"starting_year\",\n            \"programme\",\n            \"membership_type\",\n            \"achievements\",\n            \"societies\",\n        )\n\n        read_only_fields = (\"display_name\", \"starting_year\", \"programme\", \"birthday\")\n\n    pk = serializers.SerializerMethodField(\"_pk\")\n    email = serializers.SerializerMethodField(\"_email\")\n    first_name = serializers.SerializerMethodField(\"_first_name\")\n    last_name = serializers.SerializerMethodField(\"_last_name\")\n    avatar = serializers.SerializerMethodField(\"_avatar\")\n    membership_type = serializers.SerializerMethodField(\"_membership_type\")\n    achievements = serializers.SerializerMethodField(\"_achievements\")\n    societies = serializers.SerializerMethodField(\"_societies\")\n\n    def _pk(self, instance):\n        return instance.user.pk\n\n    def _email(self, instance):\n        return instance.user.email\n\n    def _first_name(self, instance):\n        return instance.user.first_name\n\n    def _last_name(self, instance):\n        return instance.user.last_name\n\n    def _membership_type(self, instance):\n        membership = instance.user.current_membership\n        if membership:\n            return membership.type\n        return None\n\n    def _achievements(self, instance):\n        return member_achievements(instance.user)\n\n    def _societies(self, instance):\n        return member_societies(instance.user)\n\n    def _avatar(self, instance):\n        placeholder = self.context[\"request\"].build_absolute_uri(\n            static(\"members/images/default-avatar.jpg\")\n        )\n        file = None\n        if instance.photo:\n            file = instance.photo\n        return create_image_thumbnail_dict(\n            self.context[\"request\"], file, placeholder=placeholder, size_large=\"800x800\"\n        )\n", "path": "website/members/api/v1/serializers.py"}]}