Re: Django Channels redis backend more explicit errors
Hi! I think you've found the wrong mailing list for this post. This mailing list is for discussing the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer your support query with their limited time and energy. For support, please follow the "Getting Help" page: https://docs.djangoproject.com/en/stable/faq/help/ . This will help you find people who are willing to support you, and to ask your question in a way that makes it easy for them to answer. Thanks for your understanding and all the best, Adam On Fri, Feb 4, 2022 at 1:29 PM Miguel Rosales wrote: > Hi, I recently came across a situation my redis backend was improperly > configured > and I got this log. I thought the problem was related to a blocked port or > something related to the container/image I was using because of the > OSError: [Errno 22] Invalid argument, I think it would be more obvious to > throw an ImproperlyConfigured exception upon having a hosts blank or None. > What do you think? > > thanks > > 2022-02-03T21:07:13.513556300Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 380, > in _brpop_with_clean > 2022-02-03T21:07:13.513575300Z > apis_message-service.1.svevr04rkdce@docker-desktop| async with > self.connection(index) as connection: > 2022-02-03T21:07:13.513605700Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 902, > in __aenter__ > 2022-02-03T21:07:13.513626500Z > apis_message-service.1.svevr04rkdce@docker-desktop| self.conn = > await self.pool.pop() > 2022-02-03T21:07:13.513645800Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 93, > in pop > 2022-02-03T21:07:13.513664700Z > apis_message-service.1.svevr04rkdce@docker-desktop| conn = await > self.create_conn(loop) > 2022-02-03T21:07:13.513684800Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 79, > in create_conn > 2022-02-03T21:07:13.513704600Z > apis_message-service.1.svevr04rkdce@docker-desktop| return await > aioredis.create_redis_pool(**kwargs) > 2022-02-03T21:07:13.513724000Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/aioredis/commands/__init__.py", > line 188, in create_redis_pool > 2022-02-03T21:07:13.513746300Z > apis_message-service.1.svevr04rkdce@docker-desktop| pool = await > create_pool(address, db=db, > 2022-02-03T21:07:13.513768800Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/aioredis/pool.py", line 58, in > create_pool > 2022-02-03T21:07:13.513792800Z > apis_message-service.1.svevr04rkdce@docker-desktop| await > pool._fill_free(override_min=False) > 2022-02-03T21:07:13.513815200Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/aioredis/pool.py", line 383, in > _fill_free > 2022-02-03T21:07:13.513839000Z > apis_message-service.1.svevr04rkdce@docker-desktop| conn = await > self._create_new_connection(self._address) > 2022-02-03T21:07:13.513869600Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/aioredis/connection.py", line 121, > in create_connection > 2022-02-03T21:07:13.513893800Z > apis_message-service.1.svevr04rkdce@docker-desktop| reader, > writer = await asyncio.wait_for(open_unix_connection( > 2022-02-03T21:07:13.513913600Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/asyncio/tasks.py", line 408, in wait_for > 2022-02-03T21:07:13.513993100Z > apis_message-service.1.svevr04rkdce@docker-desktop| return await > fut > 2022-02-03T21:07:13.514013700Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/site-packages/aioredis/stream.py", line 39, in > open_unix_connection > 2022-02-03T21:07:13.514032100Z > apis_message-service.1.svevr04rkdce@docker-desktop| transport, _ > = await get_event_loop().create_unix_connection( > 2022-02-03T21:07:13.514051900Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/asyncio/unix_events.py", line 254, in > create_unix_connection > 2022-02-03T21:07:13.514070800Z > apis_message-service.1.svevr04rkdce@docker-desktop| await > self.sock_connect(sock, path) > 2022-02-03T21:07:13.514091300Z > apis_message-service.1.svevr04rkdce@docker-desktop| File > "/usr/local/lib/python3.10/asyncio/selector_events.py", line 502, in > sock_connect > 2022-02-03T21:07:13.514112
First Contribution Django
Hello there, I am new to the world of contribution, currently, I am working on this easy picking ticket #16406 that I chose from the database. I've made the necessary changes in the code file and in the documentation but I am having a bit of trouble regarding writing a unit test for it. The changes I've made in the codebase are doing the job that has been defined in the ticket as I've checked it through installing the particular branch and building an app with the help of that branch. The problem is that I don't know in which file should I write the unit test. The changes in code were regarding URL resolve in resolvers.py. The files which I've identified on my end in which I assume that I should write the test are in the tests file of "urlpatterns" and "urlpatterns_reverse". Now, I would be grateful if someone can tell me in which file should I write the tests and I should work on them before committing and making the pull request. Thanks -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/36cafb2b-3062-498d-99b5-beef4aa70c56n%40googlegroups.com.
Django Channels redis backend more explicit errors
Hi, I recently came across a situation my redis backend was improperly configured and I got this log. I thought the problem was related to a blocked port or something related to the container/image I was using because of the OSError: [Errno 22] Invalid argument, I think it would be more obvious to throw an ImproperlyConfigured exception upon having a hosts blank or None. What do you think? thanks 2022-02-03T21:07:13.513556300Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 380, in _brpop_with_clean 2022-02-03T21:07:13.513575300Z apis_message-service.1.svevr04rkdce@docker-desktop| async with self.connection(index) as connection: 2022-02-03T21:07:13.513605700Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 902, in __aenter__ 2022-02-03T21:07:13.513626500Z apis_message-service.1.svevr04rkdce@docker-desktop| self.conn = await self.pool.pop() 2022-02-03T21:07:13.513645800Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 93, in pop 2022-02-03T21:07:13.513664700Z apis_message-service.1.svevr04rkdce@docker-desktop| conn = await self.create_conn(loop) 2022-02-03T21:07:13.513684800Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/channels_redis/core.py", line 79, in create_conn 2022-02-03T21:07:13.513704600Z apis_message-service.1.svevr04rkdce@docker-desktop| return await aioredis.create_redis_pool(**kwargs) 2022-02-03T21:07:13.513724000Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/aioredis/commands/__init__.py", line 188, in create_redis_pool 2022-02-03T21:07:13.513746300Z apis_message-service.1.svevr04rkdce@docker-desktop| pool = await create_pool(address, db=db, 2022-02-03T21:07:13.513768800Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/aioredis/pool.py", line 58, in create_pool 2022-02-03T21:07:13.513792800Z apis_message-service.1.svevr04rkdce@docker-desktop| await pool._fill_free(override_min=False) 2022-02-03T21:07:13.513815200Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/aioredis/pool.py", line 383, in _fill_free 2022-02-03T21:07:13.513839000Z apis_message-service.1.svevr04rkdce@docker-desktop| conn = await self._create_new_connection(self._address) 2022-02-03T21:07:13.513869600Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/aioredis/connection.py", line 121, in create_connection 2022-02-03T21:07:13.513893800Z apis_message-service.1.svevr04rkdce@docker-desktop| reader, writer = await asyncio.wait_for(open_unix_connection( 2022-02-03T21:07:13.513913600Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/asyncio/tasks.py", line 408, in wait_for 2022-02-03T21:07:13.513993100Z apis_message-service.1.svevr04rkdce@docker-desktop| return await fut 2022-02-03T21:07:13.514013700Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/site-packages/aioredis/stream.py", line 39, in open_unix_connection 2022-02-03T21:07:13.514032100Z apis_message-service.1.svevr04rkdce@docker-desktop| transport, _ = await get_event_loop().create_unix_connection( 2022-02-03T21:07:13.514051900Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/asyncio/unix_events.py", line 254, in create_unix_connection 2022-02-03T21:07:13.514070800Z apis_message-service.1.svevr04rkdce@docker-desktop| await self.sock_connect(sock, path) 2022-02-03T21:07:13.514091300Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 502, in sock_connect 2022-02-03T21:07:13.514112500Z apis_message-service.1.svevr04rkdce@docker-desktop| return await fut 2022-02-03T21:07:13.514133700Z apis_message-service.1.svevr04rkdce@docker-desktop| File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 512, in _sock_connect 2022-02-03T21:07:13.514153800Z apis_message-service.1.svevr04rkdce@docker-desktop| sock.connect(address) 2022-02-03T21:07:13.514173200Z apis_message-service.1.svevr04rkdce@docker-desktop| OSError: [Errno 22] Invalid argument -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.g