Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How can I restrict a user from accessing certain pages?
There are pages "password_reset/" and "password_reset/done/". After filling out the form on the "password_reset/" page, there is a redirect to the "password_reset/done/" page. But if someone tries to access the page through the url, he will succeed. How to fix it. path('password_reset/', views.PasswordResetView.as_view(), name='password_reset'), path('password_reset/done/', views.PasswordResetDoneView.as_view(), name='password_reset_done'), I tried to solve it this way, but something didn't work out. class CustomPasswordResetDoneView(PasswordResetDoneView): def get(self, request, *args, **kwargs): referer = request.META.get('HTTP_REFERER') if referer != reverse('password_reset'): return HttpResponse(status=404) return render(request, 'registration/password_reset_done.html') -
"Select a valid choice. That choice is not one of the available choices" error on OneToOneField
models.py class Major(models.Model): major = models.CharField(max_length=50, unique=True) description = models.TextField() image = models.ImageField(default='default_pics/default_major.jpg', upload_to='major_pics') class Teacher(models.Model): image = models.ImageField(default='default_pics/default_teacher.jpg', upload_to='teacher_pics') interest = models.TextField(blank=True,null=True) major = models.ForeignKey(Major, on_delete=models.SET_NULL, null=True) user = models.OneToOneField(MyUser, on_delete=models.CASCADE) forms.py class TeacherProfileCreationForm(forms.ModelForm): class Meta: model = Teacher fields = ['major', 'image'] help_texts = { 'image': 'If you do not set any image, one will be set automatically for this teacher upon creation.' } views.py @login_required def teacher_create_view(request): if request.method == 'POST': u_form = TeacherUserCreationForm(request.POST) t_form = TeacherProfileCreationForm(request.POST, request.FILES) if u_form.is_valid and t_form.is_valid(): u_form.save() t_form.save(commit=False) email = u_form.cleaned_data.get('email') user = MyUser.objects.get(email=email) t_form.instance.user = user t_form.save() teacher = Teacher.objects.get(user__email=email) messages.success(request, f'A teacher has been added!') return redirect('teacher-detail', teacher.id) else: u_form = TeacherUserCreationForm() t_form = TeacherProfileCreationForm() context = {'u_form': u_form, 't_form': t_form, 'list_url':list_url,'list_title':list_title, 'detail_title': detail_title} return render(request, 'users/teacher_create_update_form.html', context) tests.py class TestTeacher(TestCase): def setUp(self): self.client = Client() self.major = Major.objects.create( major='Test Major', description='Foo bar', ) self.teacher_user = User.objects.create( email="test_teacher@gmail.com", full_name="Test Teacher 1", is_teacher=True ) self.teacher = Teacher.objects.create( major=self.major, user=self.teacher_user ) self.teacher_create = reverse('teacher-create') def test_teacher_create(self): response = self.client.post(self.teacher_create, { 'email': 'test_teacher2@gmail.com', 'full_name': "Test Teacher 2", 'password1': '@DylanBergmanN1!', 'password2': '@DylanBergmanN1!', 'major': self.major # The error is most probably right here }) print(response.context['t_form'].errors) Error message in terminal <ul class="errorlist"><li>major<ul class="errorlist"><li>Select a valid … -
How to run vuejs project with django app together?
I am developing the front-end side in VueJs and backend-side in Django. I am using REST API for the connection between front-end and backend. After building the VueJS project, I received the dist folder. Is it right way to run this dist folder inside django project? Is it good way to continue? path('', TemplateView.as_view(template_name='index.html'), name='index') The index.html is generated by after building VueJs project. -
Downloaded zip file getting corrupts in DRF this my code
@action(detail=False, methods=['post']) def download_zip_attachment(self,request,**kwargs): data = request.data project_id=request.data.get('project_id',None) buffer = BytesIO() zf = zipfile.ZipFile(buffer, "w", zipfile.ZIP_STORED) project = Project.objects.get(id=project_id) project_doc=project.project_chunks.all() for chunk_index, chunk in enumerate(project_doc): for index, attachment in enumerate(chunk.attachments.all()): file_name = str(attachment.attachment).split('/')[-1] current_file = attachment.attachment.path if os.path.isfile(current_file): zf.write(current_file, file_name) zf.close() buffer.seek(0) response = FileResponse(buffer, as_attachment=True, filename='project.zip') response['Content-Type'] = 'application/x-zip-compressed' response['Content-Disposition'] = 'attachment; filename="project.zip"' return response @action(detail=False, methods=['post']) def download_zip_attachment(self,request,**kwargs): data = request.data project_id=request.data.get('project_id',None) buffer = BytesIO() zf = zipfile.ZipFile(buffer, "w", zipfile.ZIP_STORED) project = Project.objects.get(id=project_id) project_doc=project.project_chunks.all() for chunk_index, chunk in enumerate(project_doc): for index, attachment in enumerate(chunk.attachments.all()): file_name = str(attachment.attachment).split('/')[-1] current_file = attachment.attachment.path if os.path.isfile(current_file): zf.write(current_file, file_name) zf.close() buffer.seek(0) response = FileResponse(buffer, as_attachment=True, filename='project.zip') response['Content-Type'] = 'application/x-zip-compressed' response['Content-Disposition'] = 'attachment; filename="project.zip"' return response -
Dynamically create tab with label device IP and pull the information from device to show up in display
I am trying to build an app which will do the authentication for the ARISTA or any other Device IP address/username and password using eAPI json api. and once authenticated it will populate the device data into the new created dynamic tab. I have created the app @ https://github.com/rakeshbitsindri/connect what it is supposed to do is to do the Ajax call from the home.html to views.py for login once pressed the + button in the webpage, after successful authentication from DUT it will pull out the device info and add it in a dynamically created tab attached to the + button, this will be primary tab bar, I will need the secondary tab bar as well, where i can show various information from device categorically and also apply config /modify some of the config of device. The place where i am stuck is after pressing the + button the add_device page opens up, after putting device info the tab is not created, the device login info is correct but not sure how-to make it working seems like the ajax call is either not working in my case, or ajax call is not returning the views.py function output. or may be … -
request.session[] doesn't work on mobile phone (chrome) but works on desktop. Why?
I've made a store and it is super strange, it works on desktops and iPads without any bugs but when I check it on my mobile phone it has a strange bug. The bug is: There are a store page and the cart page. I add the first item to request.session[] on the "store page", I go to "cart page" and I see that the item is there, right from the request.session[]. Then I go back to the "store page" and add another item. I go back to the "cart page" again and I don't see the second item in the cart! I can click the "cart" link again and again. And there will not be the 2nd item. I can go to another page and then go back to the "cart" page again, and there will not be the 2nd item, but if I just refresh the page - the item will appear. Why? Why do I need to refresh the page, even going back and forward doesn't work, but only refreshing works... After refreshing it shows all items from the request.session[]. I really can't understand how it can be. Do you have a clue? I wanted to connect … -
Git pull, não puxa
meu nome é Gentil Nascimento. Tô concluindo um curso de Django, e finalizando o projeto do curso. Criei o arquivo 'requirements.txt' no visual studio code, subi pro git hub, ta tudo certo lá. To enviando o projeto pra plataforma; Google App Engine, e Dentro do Computer clonei o projeto e fiz git pull. Quando tento instalar o 'requirements.txt' dá erro. (venv) gentiln65@server-principal:~/Django3$ git pull Already up to date. (venv) gentiln65@server-principal:~/Django3$ ls blog 'folha de comandos.txt' requirements.txt templates_geral db.sqlite3 manage.py strata website (venv) gentiln65@server-principal:~/Django3$ pip install -r blog/requirements.txt Could not open requirements file: [Errno 2] No such file or directory: 'blog/requirements.txt' (venv) gentiln65@server-principal:~/Django3$ -
Getting django-eventstream and Pushpin working
I'm trying to get django-eventstream and Pushpin working within a kubernetes cluster. I can successfully subscribe to the stream, but I never receive data sent via send_event. And I do not receive any errors messages to tell me where things are going wrong. The stream I'm trying to get working is a logging stream to my app, so it is routinely getting updates. My setup: Using django-eventstream, I have the following in my Django container: settings.py - MIDDLEWARE = [ ... 'django_grip.GripMiddleware' ] INSTALLED_APPS = [ 'django_eventstream', ... ] GRIP_URL = 'http://pushpin:5561' urls.py - path('event/logmessage/', include(django_eventstream.urls), {'channels': ['logmessage']}), logutility.py - import logging from datetime import datetime from django_eventstream import send_event from django.core.serializers import serialize def logMessage(level, source, message): from .models import LogMessage logger = logging.getLogger(__name__) if level in ['DEBUG', 'INFO', 'WARNING', 'ERROR']: level = logging.getLevelName(level) logger.debug('Log message received: {0} {1} {2}'.format(logging.getLevelName(level), source, message)) logger.log(level, (source + ' - ' + message)) lm = LogMessage.objects.create(msg_time=datetime.now(), level=logging.getLevelName(level), source=source, msg_text=message) lmjson = serialize('json', [lm]) send_event('logmessage', 'message', lmjson) My web app talks to a frontend container that runs httpd (I know, we're about to switch over to nginx) httpd.conf - ProxyPass /event/ http://pushpin:7999/event/ ProxyPassReverse /event/ http://pushpin:7999/event/ And my React client does the following: componentDidMount() … -
I am unable to connect my expo react native application with django websocket
useEffect(() => { const ws = new WebSocket('ws://127.0.0.1:8000/ws/awsc/'); ws.onopen = (event) => { console.log(event.data) console.log('ws opened') }; ws.onmessage = function (event) { console.log(event.data) }; ws.onclose = function (event) { console.log("closed, code is:", event.code) }; return () => ws.close(); }, []); The following code is unable to establish connection with django web-socket. My django app is running on localhost and my react native app is running on expo app emulator The following code is unable to establish connection with django web-socket. My django app is running on localhost and my react native app is running on expo app emulator I simply want to establish connection of my django websocket with my expo react native app -
Django on Dreamhost failed to install
Did anyone tried to install Django on Dreamhost , i tried different tutorials but failed I tried to install it via ssh but failed. I tried to follow the steps one by one but without any luck -
502 Bad Gateway on my Django app hosted on Elastic beanstalk using Application Load balancer
I am having this issue on my Django web app 502 Bad Gateway ngix/1.20.0 This error occurs whenever I am trying to view any of the task_submitted models or if I want to add another one. Some times it won't display this error, it will work perfectly and some time it will display this error. The app is hosted on elastic beanstalk. I have checked my Django app terminal for any error log but I can't find any logs there. Please help me out 🙏 Thanks in advance If you need any other information about this just let me know I will provide. My model which I am having issue with when viewing or creating new objectsThe error Where can I get the error log and fix the issue. -
Premium and regular users in django
I want to differentiate the users model, have premium and regular users. How do I implement that in Django, should it be in the users class or is there another approach ? -
How to use HTMX to update cart without refreshing the page after adding product to cart in Django
In Django I add to cart and favorites without refreshing the page, but my cart and favorites are not updating (it is updated when I refresh the page). Please help I've been struggling with this for three days but failing every time I don't know what to change or add favorites are almost the same this way here is the html add to cart button {% for rs in trending_products_all %} <div class="product product-11 text-center"> <figure class="product-media"> <a href="{% url 'detail' rs.id rs.newSlug %}"> <img src="{{rs.productImage.url}}" alt="Ürün resmi" class="product-image"> {% comment %} {% for img in rs.images.all %} <img src="{{img.image.url}}" alt="Ürün resmi" class="product-image-hover"> {% endfor %} {% endcomment %} </a> <div class="product-action-vertical"> <a class="btn-product-icon btn-wishlist update-favorite" data-product="{{ rs.id }}" data-action="add"onclick="clickAddToFavoriButton(this); return false;"><span>Favorilere Ekle</span></a> </div><!-- End .product-action-vertical --> </figure><!-- End .product-media --> <div class="product-body"> <h3 class="product-title"><a href="{% url 'detail' rs.id rs.newSlug %}">{{rs.productTitle|safe}}</a></h3><!-- End .product-title --> <div class="product-price"> <b>{{rs.productPrice}} TL</b> </div><!-- End .product-price --> </div><!-- End .product-body --> <div class="product-action"> <a class="btn-product btn-cart update-cart" data-product="{{ rs.id }}" data-action="add"onclick="clickAddToCartButton(this); return false;"><span>Add To Cart</span></a> </div><!-- End .product-action --> </div><!-- End .product --> {% endfor %} views.py @login_required(login_url='login') def f_update_item(request): data = json.loads(request.body) productId = data['productId'] action = data['action'] _customer = request.user product = Product.objects.get(id=productId) … -
How to make a ban on entering by url, if it was not made by the item "name"
I have a small function that controls the checkbox. When the user clicks on the checkbox, this link is triggered by {% url 'done' task.pk %}. But if you try to open this link in another tab, the checkbox also switches. How to make the user be able to follow the link by the value "name", but when he manually enters the url, there would be an error. Well, or some alternative solution to this problem. Code template <div class="is__done__checkbox"> <form method="post" action="{% url 'done' task.pk %}"> {% csrf_token %} <input type="checkbox" name="is_done" onchange="this.form.submit()" {% if task.is_done %} checked {% endif %}> </form> </div> url path('profile/<int:pk>/done/', done, name='done'), view def done(request, pk): task = Tasks.objects.get(pk=pk) is_done = request.POST.get('is_done', False) if is_done == 'on': is_done = True task.is_done = is_done task.save() return redirect(request.META.get('HTTP_REFERER')) I tried it def login_excluded(redirect_to): def _method_wrapper(view_method): def _arguments_wrapper(request, *args, **kwargs): if request.user: return HttpResponse(status=404) return view_method(request, *args, **kwargs) return _arguments_wrapper return _method_wrapper @login_excluded('/profile/<int:pk>/done/') def done(request, pk): task = Tasks.objects.get(pk=pk) is_done = request.POST.get('is_done', False) if is_done == 'on': is_done = True task.is_done = is_done task.save() return redirect(request.META.get('HTTP_REFERER')) But when clicking on the checkbox and for the user there was an error -
Upgrading AWS elastic beanstalk from python 3.6 to python 3.8
I have been tasked with upgrading this elastic beanstalk instance. Originally it was running Python 3.6 on Amazon Linux 1. Now I am upgrading to Python 3.8 to Amazon Linux 2. It is a Django application. Originally in the .ebextensions there was a file to install packages. packages: yum: python34-devel: [] postgresql93: [] postgresql93-devel: [] gcc-c++: [] I remember the gcc package was needed in order for us to add pandas and numpy as dependencies for the application. However when I upgraded to Amazon Linux 2 it could not find any of these packages. I removed them all and the application seems to be working fine through my testing. In the new Amazon Linux 2 do I need to specifically download any of these packages or are they automatically included? Or do I just not need them anymore? Also, the code base and application were already created before I started working on it. That is why I am currently unfamiliar with what the purpose of most of those packages are besides the gcc one. I have tried researching the different packages and seeing if I need them for my current application. I have read a lot of AWS docs, but … -
Django Search Bar Autocomplete is not populating at all
I'm looking to use autocomplete to show the items already populated in the 'ComicInputs' model filed named 'Title'. It will not work after trying a few different options. I'm using a JsonResponse in this version. Models.py class ComicInput(models.Model): Title = models.CharField(max_length=50,default='', blank=False, help_text="Comic Book title") Views.py from django.http import JsonResponse @require_GET def get_titles(request): if 'term' in request.GET: qs = ComicInput.objects.filter(Title__icontains=request.GET.get('term')) titles = list(qs.values_list('Title', flat=True)) return JsonResponse(titles, safe=False) return render(request, 'app/layout.html') Urls.py path('layout/get_titles/', views.get_titles, name='get_titles') layout.html <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="{% static 'app/content/bootstrap.min.css' %}" /> <link rel="stylesheet" type="text/css" href="{% static 'app/content/site.css' %}" /> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.min.js"></script> <script src="{% static 'app/scripts/modernizr-2.6.2.js' %}"></script> <script> $(function () { $("#search").autocomplete({ source: '{% url 'get_titles' %}', minLength: 2 }); }); </script> </head> <form action="{% url 'search_page' %}" method="get" class="search-bar" style="width: 200px; height: 30px;font-size: small; align: top;" > <input type="search" id ="search" name="search" pattern=".*\S.*" value="Search Collections by Title" onFocus="this.value=''" required> <button class="search-btn" type="submit" style="background-color: #FFFFFF;"> <span>&#x1F50D;</span> </button> </form> -
Django declaring a read-only field on serializer
I have an endpoint that needs to expose the fields to the user, but under a different name. The user should -not- be able to set the PK (called orderId here) when creating the object, since that should be done automatically with a randomly set value when the object is created. Here is my serializer. class OrderSerializer(serializers.ModelSerializer): orderId = serializers.UUIDField(source="id") orderName = serializers.CharField(source="name") class Meta: model = Order fields = ( "orderId", "orderName", ) read_only_fields = ("orderId",) Here is my model: class Order(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) name = models.CharField(max_length=48) Note that id in the model is exposed to the user under the name orderId. The problem is this set up seems to make it a required field when when a user creates an order. With the above set up, a POST request setting just orderName in the body to create an order gives this error: { "orderId": [ "This field is required." ] } Unless of course the user sends a value for orderId, which they should not do. I had hoped including the "orderId" as a ready only field would make it not required in a POST request, but that does not seem to be the case. … -
Using username for password in Django
When registering a user, the password should be the same as the username, and the user should change the password later ` def save(self): self.password(self.username) super().save() ` -
How to make if statements on postgresql json field elements inside a django template
I am having a hard time checking if a json field contains certain variable value in django template language. This is my model: from django.db.models import JSONField class Widget(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) endpoint = models.CharField(max_length=512) # "/data/id" type = models.CharField(max_length=64, default="line-graph") settings = JSONField(default=dict) This is how I insert data to this model: widget, created = Widget.objects.get_or_create( user=request.user, endpoint=endpoint, ) widget.type = type_ widget.settings = { "code": "", "dashboard": dashboard.id, "position": "top", "params": "per=m&len=1" } However, when I do this in the template it fails: {% if widget.setttings.position == "top" %} This does not fail, on the other hand: {% with widget.settings.position as pos %} {% if pos == "top" %} and by "fail" I mean it doesn't pass the condition. Am I doing something wrong? Django version: 3.2 Python version: 3.8 PostgreSQL version: 12.10 -
how custom management work in django and can fill database with csv?
I am learning Django with the book web development with django In the second chapter of the book, the author fills the database with a csv file. Can anyone explain this file and how the django custom command works? python code address: https://github.com/PacktPublishing/Web-Development-with-Django/blob/master/Chapter02/final/bookr/reviews/management/commands/loadcsv.py csv address: https://github.com/PacktPublishing/Web-Development-with-Django/blob/master/Chapter02/final/bookr/reviews/management/commands/WebDevWithDjangoData.csv i just know how it work -
Can you easily deploy a django website to IONOS (1&1)
I'm currently working on a website using the django framework and I found a good price for a domain on IONOS. I was wondering whether you can deploy a django website to IONOS in a simple way. I haven't been able to find good solutions online and I don't really want to switch to a different web hosting provider. In case I have to, could you recommend any good services (I need the website to use https and to be relatively scaleable). I've tried looking for alternatives that are 'Django friendly' but they don't really meet my needs. -
How to fetch the id of an item in Django when using JSON to fetch from the database
I have a Django template whereby I am looping through several items in the homepage. When an item is clicked, a modal which I have included by importing it should be shown and data related to the clicked item displayed. I am using JSONResponse to prepopulate the modal. Once the modal is shown, I want to create a checkout session which will require the id of the item being referred to in the modal. I am stuck at how to get the id. Here is the script for showing the modal and prepopulating it: let modal = document.getElementById("modal"); modal.style.display = "none"; function modalHandler(val, content_id) { if (val) { let xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { let data = JSON.parse(this.responseText); document.getElementById("subtotal").innerHTML = data.subtotal; document.getElementById("taxes").innerHTML = data.taxes; document.getElementById("website_fee").innerHTML = data.website_fee; document.getElementById("total").innerHTML = data.total; fadeIn(modal); } }; xhr.open("GET", "/modal-content/" + content_id + "/", true); xhr.send(); } else { fadeOut(modal); } } Here is the views.py which returns the JSON data: def modal_content_view(request, content_id): my_model = get_object_or_404(MyModels, content_id=content_id) print(f"the model is {my_model.username}") data = { 'subtotal': my_model.username, 'taxes': '2.60', 'website_fee': '0.87', 'total': '23.47', 'content_id':my_model.content_id } return JsonResponse(data) Here is the script that … -
Django development server not started?
Why does this happen? When i start the sever happen this, i don't kwon why happen this, the project contain package like: tensorflow, opencv etc. The project worked, but I left it for a few days and ran it again and this happens: this is the first time this has happened to me. info: python: 3.10.4 django: 4.1 conda: 4.9.2 start the server development, the server not working previously if it worked -
How to set NPM_BIN_PATH in django settings on cPanel?
I have been trying to deploy my django project with django-tailwind on cPanel [Shared Hosting]. django-tailwind needs to have set NPM_BIN_PATH in settings.py. But in cPanel there is no npm path. -
Failing to set up a log formatter class instance using Faust
Im trying to add a class of log formatter to the faust logging_config but getting an error with not mush exlained: CANNOT SETUP LOGGING: ValueError("Unable to configure formatter 'exp_formatter'") from File "det_to_events/main.py", line 246, in <module> app.main() File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/faust/app/base.py", line 761, in main cli(app=self) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/faust/cli/base.py", line 539, in _inner cmd() File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/faust/cli/base.py", line 620, in __call__ self.run_using_worker(*args, **kwargs) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/faust/cli/base.py", line 630, in run_using_worker raise worker.execute_from_commandline() File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/mode/worker.py", line 279, in execute_from_commandline self.loop.run_until_complete(self._starting_fut) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/nest_asyncio.py", line 84, in run_until_complete self._run_once() File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/nest_asyncio.py", line 120, in _run_once handle._run() File "/opt/homebrew/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/events.py", line 81, in _run self._context.run(self._callback, *self._args) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/nest_asyncio.py", line 196, in step step_orig(task, exc) File "/opt/homebrew/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py", line 280, in __step result = coro.send(None) File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/mode/services.py", line 800, in start await self._default_start() File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/mode/services.py", line 807, in _default_start await self._actually_start() File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/mode/services.py", line 815, in _actually_start await self.on_first_start() File "/Users/matany/Library/Caches/pypoetry/virtualenvs/det-to-events-S0HiGbUI-py3.8/lib/python3.8/site-packages/faust/worker.py", line 334, in on_first_start await self.default_on_first_start() File …