Comments (6)
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.
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.
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.
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.
Yeah, That got sloved. Can you please check this once.
from bootcamp.
Fixed in the last version @verkko
from bootcamp.
Related Issues (20)
- Auto generate link for URL on news and comments HOT 16
- Deploy on Production failing HOT 1
- Search autocomplete not working HOT 1
- Q&A Votes: downvoting gives JS error
- Notifications do not have the links for the Actor and the respective Action HOT 2
- Database error while open messages HOT 1
- Tags Case-sensitive
- is there any version change HOT 3
- Global Interactions count is not working HOT 2
- Problems when deploying to production using Heroku
- Email Templates HOT 2
- Getting Broken Images HOT 5
- Add screenshots HOT 1
- Docker Deployment HOT 3
- Getting error when a comment has a link HOT 3
- Q&A make tags clickable/filterable HOT 1
- Error while posting news
- Status of project? HOT 1
- Q
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootcamp.