Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
- File "contextlib.py", line 74, in inner
- return func(*args, **kwds)
- File "django/views/decorators/csrf.py", line 54, in wrapped_view
- return view_func(*args, **kwargs)
- File "rest_framework/viewsets.py", line 125, in view
- return self.dispatch(request, *args, **kwargs)
- File "rest_framework/views.py", line 509, in dispatch
- response = self.handle_exception(exc)
- File "rest_framework/views.py", line 469, in handle_exception
- self.raise_uncaught_exception(exc)
- File "rest_framework/views.py", line 480, in raise_uncaught_exception
- raise exc
- File "rest_framework/views.py", line 506, in dispatch
- response = handler(request, *args, **kwargs)
- File "social_inbox/api/v1/views/social_content/app.py", line 46, in create
- serializer.is_valid(raise_exception=True)
- File "rest_framework/serializers.py", line 220, in is_valid
- self._validated_data = self.run_validation(self.initial_data)
- File "rest_framework/serializers.py", line 419, in run_validation
- value = self.to_internal_value(data)
- File "rest_framework/serializers.py", line 476, in to_internal_value
- validated_value = field.run_validation(primitive_value)
- File "rest_framework/relations.py", line 153, in run_validation
- return super().run_validation(data)
- File "rest_framework/fields.py", line 568, in run_validation
- value = self.to_internal_value(data)
- File "rest_framework/relations.py", line 462, in to_internal_value
- return queryset.get(**{self.slug_field: data})
- File "django/db/models/query.py", line 431, in get
- num = len(clone)
- File "django/db/models/query.py", line 262, in __len__
- self._fetch_all()
- File "django/db/models/query.py", line 1324, in _fetch_all
- self._result_cache = list(self._iterable_class(self))
- File "django/db/models/query.py", line 51, in __iter__
- results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
- File "django/db/models/sql/compiler.py", line 1173, in execute_sql
- cursor = self.connection.cursor()
- File "django/utils/asyncio.py", line 24, in inner
- raise SynchronousOnlyOperation(message)
- SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
- File "django/db/transaction.py", line 278, in __exit__
- connection.rollback()
- File "django/utils/asyncio.py", line 24, in inner
- raise SynchronousOnlyOperation(message)
- SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
- File "django/core/handlers/exception.py", line 47, in inner
- response = get_response(request)
- File "django/core/handlers/base.py", line 181, in _get_response
- response = wrapped_callback(request, *callback_args, **callback_kwargs)
- File "contextlib.py", line 74, in inner
- return func(*args, **kwds)
- File "django/db/transaction.py", line 290, in __exit__
- connection.set_autocommit(True)
- File "django/db/backends/base/base.py", line 405, in set_autocommit
- self.ensure_connection()
- File "django/utils/asyncio.py", line 24, in inner
- raise SynchronousOnlyOperation(message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement