Closed Kattenelvis closed 2 months ago
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="robots" content="NONE,NOARCHIVE"> <title>TypeError at /group/poll/1/comment/create</title> <style type="text/css"> html * { padding:0; margin:0; } body * { padding:10px 20px; } body * * { padding:0; } body { font:small sans-serif; background-color:#fff; color:#000; } body>div { border-bottom:1px solid #ddd; } h1 { font-weight:normal; } h2 { margin-bottom:.8em; } h3 { margin:1em 0 .5em 0; } h4 { margin:0 0 .5em 0; font-weight: normal; } code, pre { font-size: 100%; white-space: pre-wrap; } summary { cursor: pointer; } table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; } tbody td, tbody th { vertical-align:top; padding:2px 3px; } thead th { padding:1px 6px 1px 3px; background:#fefefe; text-align:left; font-weight:normal; font-size:11px; border:1px solid #ddd; } tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; } table.vars { margin:5px 0 2px 40px; } table.vars td, table.req td { font-family:monospace; } table td.code { width:100%; } table td.code pre { overflow:hidden; } table.source th { color:#666; } table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; } ul.traceback { list-style-type:none; color: #222; } ul.traceback li.frame { padding-bottom:1em; color:#4f4f4f; } ul.traceback li.user { background-color:#e0e0e0; color:#000 } div.context { padding:10px 0; overflow:hidden; } div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; } div.context ol li { font-family:monospace; white-space:pre; color:#777; cursor:pointer; padding-left: 2px; } div.context ol li pre { display:inline; } div.context ol.context-line li { color:#464646; background-color:#dfdfdf; padding: 3px 2px; } div.context ol.context-line li span { position:absolute; right:32px; } .user div.context ol.context-line li { background-color:#bbb; color:#000; } .user div.context ol li { color:#666; } div.commands, summary.commands { margin-left: 40px; } div.commands a, summary.commands { color:#555; text-decoration:none; } .user div.commands a { color: black; } #summary { background: #ffc; } #summary h2 { font-weight: normal; color: #666; } #explanation { background:#eee; } #template, #template-not-exist { background:#f6f6f6; } #template-not-exist ul { margin: 0 0 10px 20px; } #template-not-exist .postmortem-section { margin-bottom: 3px; } #unicode-hint { background:#eee; } #traceback { background:#eee; } #requestinfo { background:#f6f6f6; padding-left:120px; } #summary table { border:none; background:transparent; } #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; } #requestinfo h3 { margin-bottom:-1em; } .error { background: #ffc; } .specific { color:#cc3300; font-weight:bold; } h2 span.commands { font-size:.7em; font-weight:normal; } span.commands a:link {color:#5E5694;} pre.exception_value { font-family: sans-serif; color: #575757; font-size: 1.5em; margin: 10px 0 10px 0; } .append-bottom { margin-bottom: 10px; } .fname { user-select: all; } </style> <script> function hideAll(elems) { for (var e = 0; e < elems.length; e++) { elems[e].style.display = 'none'; } } window.onload = function() { hideAll(document.querySelectorAll('ol.pre-context')); hideAll(document.querySelectorAll('ol.post-context')); hideAll(document.querySelectorAll('div.pastebin')); } function toggle() { for (var i = 0; i < arguments.length; i++) { var e = document.getElementById(arguments[i]); if (e) { e.style.display = e.style.display == 'none' ? 'block': 'none'; } } return false; } function switchPastebinFriendly(link) { s1 = "Switch to copy-and-paste view"; s2 = "Switch back to interactive view"; link.textContent = link.textContent.trim() == s1 ? s2: s1; toggle('browserTraceback', 'pastebinTraceback'); return false; } </script> </head> <body> <div id="summary"> <h1>TypeError at /group/poll/1/comment/create</h1> <pre class="exception_value">poll_comment_create() missing 1 required keyword-only argument: 'attachments'</pre> <table class="meta"> <tr> <th>Request Method:</th> <td>POST</td> </tr> <tr> <th>Request URL:</th> <td>http://localhost:8000/group/poll/1/comment/create</td> </tr> <tr> <th>Django Version:</th> <td>4.0.8</td> </tr> <tr> <th>Exception Type:</th> <td>TypeError</td> </tr> <tr> <th>Exception Value:</th> <td><pre>poll_comment_create() missing 1 required keyword-only argument: 'attachments'</pre></td> </tr> <tr> <th>Exception Location:</th> <td><span class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/flowback/poll/views/comment.py</span>, line 40, in post</td> </tr> <tr> <th>Python Executable:</th> <td>/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/bin/python3</td> </tr> <tr> <th>Python Version:</th> <td>3.10.12</td> </tr> <tr> <th>Python Path:</th> <td><pre>['/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend', '/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages']</pre></td> </tr> <tr> <th>Server time:</th> <td>Sun, 21 Jan 2024 09:14:58 +0000</td> </tr> </table> </div> <div id="traceback"> <h2>Traceback <span class="commands"><a href="#" onclick="return switchPastebinFriendly(this);"> Switch to copy-and-paste view</a></span> </h2> <div id="browserTraceback"> <ul class="traceback"> <li class="frame django"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/django/core/handlers/exception.py</code>, line 42, in inner <div class="context" id="c139818330934528"> <ol start="35" class="pre-context" id="pre139818330934528"> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> can rely on getting a response instead of an exception.</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> """</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> if asyncio.iscoroutinefunction(get_response):</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre></pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> @wraps(get_response)</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> async def inner(request):</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> try:</pre></li> </ol> <ol start="42" class="context-line"> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> response = await get_response(request)</pre> <span>…</span></li> </ol> <ol start='43' class="post-context" id="post139818330934528"> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> except Exception as exc:</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> response = await sync_to_async(</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> response_for_exception, thread_sensitive=False</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> )(request, exc)</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre> return response</pre></li> <li onclick="toggle('pre139818330934528', 'post139818330934528')"><pre></pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818330934528"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>exc</td> <td class="code"><pre>TypeError("poll_comment_create() missing 1 required keyword-only argument: 'attachments'")</pre></td> </tr> <tr> <td>get_response</td> <td class="code"><pre><bound method BaseHandler._get_response_async of <django.core.handlers.asgi.ASGIHandler object at 0x7f2a04640d90>></pre></td> </tr> <tr> <td>request</td> <td class="code"><pre><ASGIRequest: POST '/group/poll/1/comment/create'></pre></td> </tr> </tbody> </table> </details> </li> <li class="frame django"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/django/core/handlers/base.py</code>, line 253, in _get_response_async <div class="context" id="c139818433562240"> <ol start="246" class="pre-context" id="pre139818433562240"> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> wrapped_callback = self.make_view_atomic(callback)</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> # If it is a synchronous view, run it in a subthread</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> if not asyncio.iscoroutinefunction(wrapped_callback):</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> wrapped_callback = sync_to_async(</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> wrapped_callback, thread_sensitive=True</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> )</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> try:</pre></li> </ol> <ol start="253" class="context-line"> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> response = await wrapped_callback(</pre> <span>…</span></li> </ol> <ol start='254' class="post-context" id="post139818433562240"> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> request, *callback_args, **callback_kwargs</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> )</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> except Exception as e:</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> response = await sync_to_async(</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> self.process_exception_by_middleware,</pre></li> <li onclick="toggle('pre139818433562240', 'post139818433562240')"><pre> thread_sensitive=True,</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433562240"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>callback</td> <td class="code"><pre><function View.as_view.<locals>.view at 0x7f2a0490f760></pre></td> </tr> <tr> <td>callback_args</td> <td class="code"><pre>()</pre></td> </tr> <tr> <td>callback_kwargs</td> <td class="code"><pre>{'poll': 1}</pre></td> </tr> <tr> <td>middleware_method</td> <td class="code"><pre><asgiref.sync.SyncToAsync object at 0x7f2a04641150></pre></td> </tr> <tr> <td>request</td> <td class="code"><pre><ASGIRequest: POST '/group/poll/1/comment/create'></pre></td> </tr> <tr> <td>response</td> <td class="code"><pre>None</pre></td> </tr> <tr> <td>self</td> <td class="code"><pre><django.core.handlers.asgi.ASGIHandler object at 0x7f2a04640d90></pre></td> </tr> <tr> <td>wrapped_callback</td> <td class="code"><pre><asgiref.sync.SyncToAsync object at 0x7f29fdf96050></pre></td> </tr> </tbody> </table> </details> </li> <li class="frame user"> <code class="fname">/usr/lib/python3.10/concurrent/futures/thread.py</code>, line 58, in run <div class="context" id="c139818330939456"> <ol start="51" class="pre-context" id="pre139818330939456"> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> self.kwargs = kwargs</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre></pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> def run(self):</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> if not self.future.set_running_or_notify_cancel():</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> return</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre></pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> try:</pre></li> </ol> <ol start="58" class="context-line"> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> result = self.fn(*self.args, **self.kwargs)</pre> <span>…</span></li> </ol> <ol start='59' class="post-context" id="post139818330939456"> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> except BaseException as exc:</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> self.future.set_exception(exc)</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> # Break a reference cycle with the exception 'exc'</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> self = None</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> else:</pre></li> <li onclick="toggle('pre139818330939456', 'post139818330939456')"><pre> self.future.set_result(result)</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818330939456"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>self</td> <td class="code"><pre>None</pre></td> </tr> </tbody> </table> </details> </li> <li class="frame django"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/django/views/decorators/csrf.py</code>, line 54, in wrapped_view <div class="context" id="c139818433769088"> <ol start="47" class="pre-context" id="pre139818433769088"> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre></pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre></pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre>def csrf_exempt(view_func):</pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre> """Mark a view function as being exempt from the CSRF view protection."""</pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre> # view_func.csrf_exempt = True would also work, but decorators are nicer</pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre> # if they don't have side effects, so return a new function.</pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre> def wrapped_view(*args, **kwargs):</pre></li> </ol> <ol start="54" class="context-line"> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre> return view_func(*args, **kwargs)</pre> <span>…</span></li> </ol> <ol start='55' class="post-context" id="post139818433769088"> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre></pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre> wrapped_view.csrf_exempt = True</pre></li> <li onclick="toggle('pre139818433769088', 'post139818433769088')"><pre> return wraps(view_func)(wrapped_view)</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433769088"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>args</td> <td class="code"><pre>(<ASGIRequest: POST '/group/poll/1/comment/create'>,)</pre></td> </tr> <tr> <td>kwargs</td> <td class="code"><pre>{'poll': 1}</pre></td> </tr> <tr> <td>view_func</td> <td class="code"><pre><function View.as_view.<locals>.view at 0x7f2a0490f6d0></pre></td> </tr> </tbody> </table> </details> </li> <li class="frame django"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/django/views/generic/base.py</code>, line 84, in view <div class="context" id="c139818433573568"> <ol start="77" class="pre-context" id="pre139818433573568"> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> self = cls(**initkwargs)</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> self.setup(request, *args, **kwargs)</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> if not hasattr(self, "request"):</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> raise AttributeError(</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> "%s instance has no 'request' attribute. Did you override "</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> "setup() and forget to call super()?" % cls.__name__</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> )</pre></li> </ol> <ol start="84" class="context-line"> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> return self.dispatch(request, *args, **kwargs)</pre> <span>…</span></li> </ol> <ol start='85' class="post-context" id="post139818433573568"> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre></pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> view.view_class = cls</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> view.view_initkwargs = initkwargs</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre></pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> # __name__ and __qualname__ are intentionally left unchanged as</pre></li> <li onclick="toggle('pre139818433573568', 'post139818433573568')"><pre> # view_class should be used to robustly determine the name of the view</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433573568"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>args</td> <td class="code"><pre>()</pre></td> </tr> <tr> <td>cls</td> <td class="code"><pre><class 'flowback.poll.views.comment.PollCommentCreateAPI'></pre></td> </tr> <tr> <td>initkwargs</td> <td class="code"><pre>{}</pre></td> </tr> <tr> <td>kwargs</td> <td class="code"><pre>{'poll': 1}</pre></td> </tr> <tr> <td>request</td> <td class="code"><pre><ASGIRequest: POST '/group/poll/1/comment/create'></pre></td> </tr> <tr> <td>self</td> <td class="code"><pre><flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820></pre></td> </tr> </tbody> </table> </details> </li> <li class="frame user"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/rest_framework/views.py</code>, line 509, in dispatch <div class="context" id="c139818433759616"> <ol start="502" class="pre-context" id="pre139818433759616"> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> self.http_method_not_allowed)</pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> else:</pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> handler = self.http_method_not_allowed</pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre></pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> response = handler(request, *args, **kwargs)</pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre></pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> except Exception as exc:</pre></li> </ol> <ol start="509" class="context-line"> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> response = self.handle_exception(exc)</pre> <span>…</span></li> </ol> <ol start='510' class="post-context" id="post139818433759616"> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre></pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> self.response = self.finalize_response(request, response, *args, **kwargs)</pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> return self.response</pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre></pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> def options(self, request, *args, **kwargs):</pre></li> <li onclick="toggle('pre139818433759616', 'post139818433759616')"><pre> """</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433759616"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>args</td> <td class="code"><pre>()</pre></td> </tr> <tr> <td>handler</td> <td class="code"><pre><bound method PollCommentCreateAPI.post of <flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820>></pre></td> </tr> <tr> <td>kwargs</td> <td class="code"><pre>{'poll': 1}</pre></td> </tr> <tr> <td>request</td> <td class="code"><pre><rest_framework.request.Request: POST '/group/poll/1/comment/create'></pre></td> </tr> <tr> <td>self</td> <td class="code"><pre><flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820></pre></td> </tr> </tbody> </table> </details> </li> <li class="frame user"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/rest_framework/views.py</code>, line 469, in handle_exception <div class="context" id="c139818433771328"> <ol start="462" class="pre-context" id="pre139818433771328"> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre></pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> exception_handler = self.get_exception_handler()</pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre></pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> context = self.get_exception_handler_context()</pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> response = exception_handler(exc, context)</pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre></pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> if response is None:</pre></li> </ol> <ol start="469" class="context-line"> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> self.raise_uncaught_exception(exc)</pre> <span>…</span></li> </ol> <ol start='470' class="post-context" id="post139818433771328"> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre></pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> response.exception = True</pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> return response</pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre></pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> def raise_uncaught_exception(self, exc):</pre></li> <li onclick="toggle('pre139818433771328', 'post139818433771328')"><pre> if settings.DEBUG:</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433771328"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>context</td> <td class="code"><pre>{'args': (), 'kwargs': {'poll': 1}, 'request': <rest_framework.request.Request: POST '/group/poll/1/comment/create'>, 'view': <flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820>}</pre></td> </tr> <tr> <td>exc</td> <td class="code"><pre>TypeError("poll_comment_create() missing 1 required keyword-only argument: 'attachments'")</pre></td> </tr> <tr> <td>exception_handler</td> <td class="code"><pre><function drf_default_with_modifications_exception_handler at 0x7f2a040f0ee0></pre></td> </tr> <tr> <td>response</td> <td class="code"><pre>None</pre></td> </tr> <tr> <td>self</td> <td class="code"><pre><flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820></pre></td> </tr> </tbody> </table> </details> </li> <li class="frame user"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/rest_framework/views.py</code>, line 480, in raise_uncaught_exception <div class="context" id="c139818433759168"> <ol start="473" class="pre-context" id="pre139818433759168"> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre></pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> def raise_uncaught_exception(self, exc):</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> if settings.DEBUG:</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> request = self.request</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> renderer_format = getattr(request.accepted_renderer, 'format')</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> use_plaintext_traceback = renderer_format not in ('html', 'api', 'admin')</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> request.force_plaintext_errors(use_plaintext_traceback)</pre></li> </ol> <ol start="480" class="context-line"> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> raise exc</pre> <span>…</span></li> </ol> <ol start='481' class="post-context" id="post139818433759168"> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre></pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> # Note: Views are made CSRF exempt from within `as_view` as to prevent</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> # accidental removal of this exemption in cases where `dispatch` needs to</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> # be overridden.</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> def dispatch(self, request, *args, **kwargs):</pre></li> <li onclick="toggle('pre139818433759168', 'post139818433759168')"><pre> """</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433759168"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>exc</td> <td class="code"><pre>TypeError("poll_comment_create() missing 1 required keyword-only argument: 'attachments'")</pre></td> </tr> <tr> <td>renderer_format</td> <td class="code"><pre>'json'</pre></td> </tr> <tr> <td>request</td> <td class="code"><pre><rest_framework.request.Request: POST '/group/poll/1/comment/create'></pre></td> </tr> <tr> <td>self</td> <td class="code"><pre><flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820></pre></td> </tr> <tr> <td>use_plaintext_traceback</td> <td class="code"><pre>True</pre></td> </tr> </tbody> </table> </details> </li> <li class="frame user"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/venv/lib/python3.10/site-packages/rest_framework/views.py</code>, line 506, in dispatch <div class="context" id="c139818433574272"> <ol start="499" class="pre-context" id="pre139818433574272"> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> # Get the appropriate handler method</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> if request.method.lower() in self.http_method_names:</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> handler = getattr(self, request.method.lower(),</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> self.http_method_not_allowed)</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> else:</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> handler = self.http_method_not_allowed</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre></pre></li> </ol> <ol start="506" class="context-line"> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> response = handler(request, *args, **kwargs)</pre> <span>…</span></li> </ol> <ol start='507' class="post-context" id="post139818433574272"> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre></pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> except Exception as exc:</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> response = self.handle_exception(exc)</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre></pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> self.response = self.finalize_response(request, response, *args, **kwargs)</pre></li> <li onclick="toggle('pre139818433574272', 'post139818433574272')"><pre> return self.response</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433574272"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>args</td> <td class="code"><pre>()</pre></td> </tr> <tr> <td>handler</td> <td class="code"><pre><bound method PollCommentCreateAPI.post of <flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820>></pre></td> </tr> <tr> <td>kwargs</td> <td class="code"><pre>{'poll': 1}</pre></td> </tr> <tr> <td>request</td> <td class="code"><pre><rest_framework.request.Request: POST '/group/poll/1/comment/create'></pre></td> </tr> <tr> <td>self</td> <td class="code"><pre><flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820></pre></td> </tr> </tbody> </table> </details> </li> <li class="frame user"> <code class="fname">/home/vboxuser/Desktop/flowback-setup/resources/flowback/backend/flowback/poll/views/comment.py</code>, line 40, in post <div class="context" id="c139818433569728"> <ol start="33" class="pre-context" id="pre139818433569728"> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre></pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre>@extend_schema(tags=['poll'])</pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre>class PollCommentCreateAPI(CommentCreateAPI):</pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre> def post(self, request, poll: int):</pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre> serializer = self.InputSerializer(data=request.data)</pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre> serializer.is_valid(raise_exception=True)</pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre></pre></li> </ol> <ol start="40" class="context-line"> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre> comment = poll_comment_create(author_id=request.user.id, poll_id=poll, **serializer.validated_data)</pre> <span>…</span></li> </ol> <ol start='41' class="post-context" id="post139818433569728"> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre></pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre> return Response(status=status.HTTP_200_OK, data=comment.id)</pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre></pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre></pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre>@extend_schema(tags=['poll'])</pre></li> <li onclick="toggle('pre139818433569728', 'post139818433569728')"><pre>class PollCommentUpdateAPI(CommentUpdateAPI):</pre></li> </ol> </div> <details> <summary class="commands">Local vars</summary> <table class="vars" id="v139818433569728"> <thead> <tr> <th>Variable</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>poll</td> <td class="code"><pre>1</pre></td> </tr> <tr> <td>request</td> <td class="code"><pre><rest_framework.request.Request: POST '/group/poll/1/comment/create'></pre></td> </tr> <tr> <td>self</td> <td class="code"><pre><flowback.poll.views.comment.PollCommentCreateAPI object at 0x7f29fdf94820></pre></td> </tr> <tr> <td>serializer</td> <td class="code"><pre>InputSerializer(data=<QueryDict: {'message': ['dada']}>): parent_id = IntegerField(required=False) message = CharField() attachments = ListField(child=FileField(), max_length=10, required=False)</pre></td> </tr> </tbody> </table> </details> </li> </ul> </div> <form action="https://dpaste.com/" name="pasteform" id="pasteform" method="post"> <div id="pastebinTraceback" class="pastebin"> <input type="hidden" name="language" value="PythonConsole"> <input type="hidden" name="title" value="TypeError at /group/poll/1/comment/create"> <input type="hidden" name="source" value="Django Dpaste Agent"> <input type="hidden" name="poster" value="Django"> <textarea name="content" id="traceback_area" cols="140" rows="25">
Is this issue still relevant?
No! Seems fixed