codingelle / django-whatsapp-web-clone

A WhatsApp Web Clone Chat Application for those developers that like to use Django Channel for handling WebSocket request
https://youtu.be/zv7Ra-xW1MU
138 stars 64 forks source link

Seeing internal server error [500] when trying to chat #30

Open Abdul-Rafae-Mohammed opened 1 month ago

Abdul-Rafae-Mohammed commented 1 month ago

I am seeing below error when I am trying to chat. I tried deleting the database and running "python manage.py runserver" command but still seeing the same issue.

Any suggestions to resolve the issue?

Error: cursor = self._conn.execute(sql, parameters) sqlite3.OperationalError: no such table: chat_chatmessage

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/*/env1/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/**/env1/lib/python3.7/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) File "/Users/*/env1/lib/python3.7/site-packages/asgiref/sync.py", line 223, in call return call_result.result() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py", line 425, in result return self.get_result() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py", line 384, in get_result raise self._exception File "/Users/***/env1/lib/python3.7/site-packages/asgiref/sync.py", line 292, in main_wrap result = await self.awaitable(*args, **kwargs) File "/Users/*/Downloads/django-whatsapp-web-clone-master/chat/views.py", line 62, in history chat_message = await ChatMessage.filter(room_id=room_id).order_by('date_created').values() File "/Users//env1/lib/python3.7/site-packages/tortoise/queryset.py", line 1276, in _execute result = await self._db.execute_query_dict(str(self.query)) File "/Users/****/env1/lib/python3.7/site-packages/tortoise/backends/sqlite/client.py", line 31, in translateexceptions raise OperationalError(exc) tortoise.exceptions.OperationalError: no such table: chat_chatmessage HTTP GET /chat/history/2/ 500 [0.06, 127.0.0.1:55015]

josnin commented 1 month ago

should be auto create, are you able to share your setup?

Abdul-Rafae-Mohammed commented 1 month ago

How can I share my setup? django-whatsapp-webclone-master.zip I zipped the complete folder and shared it here.will that do?