Giter Site home page Giter Site logo

Error while posting news about bootcamp HOT 6 CLOSED

verkko avatar verkko commented on July 17, 2024
Error while posting news

from bootcamp.

Comments (6)

Vamoss avatar Vamoss commented on July 17, 2024 1

This should solve, there is already a pull-request:
Vamoss@6d991dd

It happens when a news doesn't have a URL in the text.

from bootcamp.

sebastian-code avatar sebastian-code commented on July 17, 2024

Hi @verkko can you share the whole stack trace of the error? The screenshot you are sharing takes away all the relevant data. It would be very helpful to have so I can understand what is happening. Also, can you share with me the URL you were trying to call?

from bootcamp.

verkko avatar verkko commented on July 17, 2024

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/comments/post/

Django Version: 3.0.5
Python Version: 3.7.6
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django.contrib.admin',
'django.forms',
'crispy_forms',
'sorl.thumbnail',
'allauth',
'allauth.account',
'allauth.socialaccount',
'channels',
'django_comments',
'graphene_django',
'markdownx',
'taggit',
'bootcamp.users.apps.UsersConfig',
'bootcamp.articles.apps.ArticlesConfig',
'bootcamp.messager.apps.MessagerConfig',
'bootcamp.news.apps.NewsConfig',
'bootcamp.notifications.apps.NotificationsConfig',
'bootcamp.qa.apps.QaConfig',
'bootcamp.search.apps.SearchConfig',
'debug_toolbar',
'django_extensions']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware']

Traceback (most recent call last):
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\contextlib.py", line 74, in inner
return func(*args, **kwds)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django\utils\decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django_comments\views\comments.py", line 126, in post_comment
request=request
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django\dispatch\dispatcher.py", line 175, in send
for receiver in self._live_receivers(sender)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\django\dispatch\dispatcher.py", line 175, in
for receiver in self._live_receivers(sender)
File "C:\Users\ameen\PycharmProjects\bk6\bootcamp\bootcamp\articles\models.py", line 93, in notify_comment
notification_handler(actor, receiver, Notification.COMMENTED, action_object=obj)
File "C:\Users\ameen\PycharmProjects\bk6\bootcamp\bootcamp\notifications\models.py", line 243, in notification_handler
actor, key, id_value=id_value, recipient=recipient.username
File "C:\Users\ameen\PycharmProjects\bk6\bootcamp\bootcamp\notifications\models.py", line 273, in notification_broadcast
async_to_sync(channel_layer.group_send)("notifications", payload)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\asgiref\sync.py", line 120, in call
return call_result.result()
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\concurrent\futures_base.py", line 428, in result
return self.__get_result()
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\concurrent\futures_base.py", line 384, in __get_result
raise self.exception
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\asgiref\sync.py", line 180, in main_wrap
result = await self.awaitable(*args, **kwargs)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\channels_redis\core.py", line 614, in group_send
async with self.connection(self.consistent_hash(group)) as connection:
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\channels_redis\core.py", line 835, in aenter
self.conn = await self.pool.pop()
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\channels_redis\core.py", line 73, in pop
conns.append(await aioredis.create_redis(**self.host, loop=loop))
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\aioredis\commands_init
.py", line 175, in create_redis
loop=loop)
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\aioredis\connection.py", line 113, in create_connection
timeout)
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\asyncio\tasks.py", line 414, in wait_for
return await fut
File "C:\Users\ameen\PycharmProjects\bk6\newbk\lib\site-packages\aioredis\stream.py", line 24, in open_connection
lambda: protocol, host, port, **kwds)
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 958, in create_connection
raise exceptions[0]
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 945, in create_connection
await self.sock_connect(sock, address)
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\asyncio\selector_events.py", line 473, in sock_connect
return await fut
File "C:\Users\ameen\AppData\Local\Programs\Python\Python37\lib\asyncio\selector_events.py", line 503, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')

Exception Type: ConnectionRefusedError at /comments/post/
Exception Value: [Errno 10061] Connect call failed ('127.0.0.1', 6379)

from bootcamp.

sebastian-code avatar sebastian-code commented on July 17, 2024

Ahh, I see, the issue you're experiencing is related to your Redis setup. Check your local redis configuration, and validate than the ASGI server is running properly.

from bootcamp.

verkko avatar verkko commented on July 17, 2024

Yeah, That got sloved. Can you please check this once.

Screenshot (7)

from bootcamp.

sebastian-code avatar sebastian-code commented on July 17, 2024

Fixed in the last version @verkko

from bootcamp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.