Open sujunze opened 8 months ago
Hi @sujunze, can you please provide us with enough information for us to replicate the error that you're seeing? Labeling configuration, installation method, data, and anything else to help us reproduce the error and determine if it's a bug would be very helpful. Thanks!
{"id":"8ee600c4-a7dd-4895-85c3-0f64dfd0c845","status_code":500,"version":"1.10.0","detail":"The .create() method does not support writable nested fields by default.\nWrite an explicit .create() method for serializer data_export.serializers.ExportCreateSerializer, or set read_only=True on nested serializer fields.","exc_info":"Traceback (most recent call last):\n File "/usr/local/lib/python3.10/dist-packages/rest_framework/views.py", line 506, in dispatch\n response = handler(request, *args, kwargs)\n File "/usr/local/lib/python3.10/dist-packages/django/utils/decorators.py", line 43, in _wrapper\n return bound_method(*args, *kwargs)\n File "/usr/local/lib/python3.10/dist-packages/rest_framework/generics.py", line 242, in post\n return self.create(request, args, kwargs)\n File "/usr/local/lib/python3.10/dist-packages/rest_framework/mixins.py", line 19, in create\n self.perform_create(serializer)\n File "/label-studio/label_studio/./data_export/api.py", line 332, in perform_create\n serializer.save(project=project, created_by=self.request.user)\n File "/usr/local/lib/python3.10/dist-packages/rest_framework/serializers.py", line 212, in save\n self.instance = self.create(validated_data)\n File "/usr/local/lib/python3.10/dist-packages/rest_framework/serializers.py", line 948, in create\n raise_errors_on_nested_writes('create', self, validated_data)\n File "/usr/local/lib/python3.10/dist-packages/rest_framework/serializers.py", line 813, in raise_errors_on_nested_writes\n assert not any(\nAssertionError: The .create() method does not support writable nested fields by default.\nWrite an explicit .create() method for serializer data_export.serializers.ExportCreateSerializer, or set read_only=True on nested serializer fields.\n"}
return result: <!DOCTYPE html>
An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.
If you are the system administrator of this resource then you should check the error log for details.
Faithfully yours, nginx.