Python Live Chat Room Tutorial Using Flask & SocketIO

Python Live Chat Room Tutorial Using Flask & SocketIO

Tech With Tim

1 год назад

77,119 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Usman Amjad
Usman Amjad - 05.10.2023 16:14

i am having a problem the date of the messages dont show pm or am like if its 6pm it will show 18:0:0 i also tried with your code from git hub but its still the same bug

Ответить
Darlan Almeida
Darlan Almeida - 28.09.2023 19:45

Do you have the project repository?

Ответить
Humza Haroon
Humza Haroon - 07.09.2023 22:51

how do you make the return button send the messages as well?

Ответить
krump4you
krump4you - 07.09.2023 06:34

Thanks for video!
IMAO it;s not hard to do at localhost. Troubles begins when deploying with domain and ssl

Ответить
Adedoyin Ayobami
Adedoyin Ayobami - 29.08.2023 08:50

I followed the videos and everything including all codes and instructions but my socketio is not connected to the local host….

Ответить
Oluwatosin Oseni
Oluwatosin Oseni - 21.08.2023 20:18

any luck doing this with flask restful

Ответить
Ian Samuels
Ian Samuels - 12.08.2023 07:34

At the 20 minute and 55 second mark where he shows his page, when i try the same thing my page is a blank white page with no text. Any one have any reasons why this might be?

Ответить
AronDS
AronDS - 09.08.2023 22:52

Thank you

Ответить
Ashkan Ahmady Afkham
Ashkan Ahmady Afkham - 05.08.2023 01:52

hey tim thanks for the video, I had a question. Everytime I close the tab it takes about a 50-60 seconds that the socket "disconnect" function gets triggered, is this normal?

Ответить
Toyokoyo
Toyokoyo - 27.07.2023 21:49

hey im getting an error "WebSocket transport not available. Install simple-websocket for improved performance.
* Serving Flask app 'main'
* Debug mode: on
An attempt was made to access a socket in a way forbidden by its access permissions" and the web server is not showing can u help?

Ответить
İki Yolcu
İki Yolcu - 15.07.2023 17:19

Hello,
When im refreshing page with your code, disconnect is not triggering on me, and on every refresh members count increasing. Do you have any idea with that?

Ответить
Sauhardya Haldar
Sauhardya Haldar - 01.07.2023 18:02

Very very thank you sir.. You just nailed it.. thank you soo much.. Had I not been in school, I would have definitely gifted you a super thanks.. thanks again sir.. !!

Ответить
Ali JafarBeglou
Ali JafarBeglou - 29.06.2023 19:01

Thank you for the tutorial! I followed your instructions and was able to build a chatroom and works fine locally. However, I’m having trouble deploying it on Heroku. The site itself comes up, but I can’t find the room or send messages. Do you know how to fix this issue? [Procfile (web: gunicorn main:app) and dynos is ON]. Any help would be greatly appreciated. Thank you!

Ответить
Cha Lee Priv
Cha Lee Priv - 26.06.2023 16:51

Where in your code there client sends/broadcast/trigger 'connect' event? I watched it 4 times and can't figure out this magic.... ?

Ответить
Pedro Antunes
Pedro Antunes - 13.06.2023 17:09

I´m really struggling to make this project!
Yesterday I watched this whole video, and coded as you were coding, but something went wrong and I can not get it right.
This error:

"TypeError

TypeError: The view function for 'home' did not return a valid response. The function either returned None or ended without a return statement."

and a list with a bunch of others (that I don´t understand what it is saying), keep showing me as I try to run the project.

I have already tried everything:
Get your code and look after all the mistakes that I´ve made;
Redo from the scratch;
I even created a new project, copying and pasting the whole code (through your github), but even that wasn´t enought!


I know that I´m making (or ignoring) a small mistake, so please If somebody could help me anyway, please do! I´d really like to have this project running and learn with this kind of mistakes!

Thank you.

Ответить
Muneeb Akram
Muneeb Akram - 06.06.2023 14:19

how to deploy this? because everything is working great on the server but the app when I deploy it is not working.

Ответить
Selena B
Selena B - 19.05.2023 09:32

I noticed you emitted to “message” using socket. Does that mean if a chat room sends a message, all chat rooms that aren’t the current one will be receiving a “message” signal as well? Of course, messages from different chat rooms won’t show up, but I was wondering how this would affect traffic if the site has a lot of users.

Ответить
Gilberto Albino
Gilberto Albino - 01.05.2023 18:10

Somethings are so damn simple, that you just feel stupid for not pursuing that!

Ответить
Hooman st
Hooman st - 30.04.2023 23:07

I am kind of disappointed in learning how to code, since AI is going to take over! that sucks! coding was a passion of mine

Ответить
Average Programer
Average Programer - 29.04.2023 02:07

I made the website but it says template not found when i clearly have home.html

Ответить
Neceros
Neceros - 15.04.2023 11:52

It's fun to note this room/user socket system ca be used in many different ways. Making a chat room just highlights the process well. Imagine if each "user" was some API or process. Easy to send data that way

Ответить
Pratyaksh Parashar
Pratyaksh Parashar - 14.04.2023 13:35

Can anyone tell me why this code is not after deploying it. ServerLogs says there are invalid sessions lot more.
Help

Ответить
Alnyz
Alnyz - 12.04.2023 17:30

can you do BeeWare with Socket to create app(android/desktop) live chat?

Ответить
Gerry Hoekema
Gerry Hoekema - 29.03.2023 00:21

Figured it out...I was missing the statement: room=session.get("room")

Ответить
Gerry Hoekema
Gerry Hoekema - 28.03.2023 23:49

I am having a conflict with def room(): and the room not in rooms boolean. It is true rather than false since it is comparing a function not in rooms: rooms[room] = {"members": 0, "messages": }} room is not in rooms : room = <function room at 0x7fca2f08e670>

Ответить
M02 SAP
M02 SAP - 23.03.2023 12:10

wow, it is great, many thanks all to you

Ответить
Anton Roy
Anton Roy - 11.03.2023 23:32

for me when i typed in the url, it said that it refused to connect. can anyone explain why?

Ответить
Soumya Milind
Soumya Milind - 10.03.2023 23:21

Make a tutorial on how to make a website where users can create their own threads and then the homepage will show all those threads and then user can click on a particular thread of their own choice and start chatting in that room. Please!

Ответить
Infinite Space
Infinite Space - 08.03.2023 21:20

Just wondering, how come you are not using a virtual environment?

Ответить
Андрей Щипцов
Андрей Щипцов - 08.03.2023 16:05

Thanks, Tim, really enjoyed this video, and also learn sth new as well.

Ответить
Abhishek keshari
Abhishek keshari - 03.03.2023 14:35

Thank you for wonderful tutorial ...

Sir please provide tutorial on "sanic framework" and gitlab and project too ...

Ответить
Matthew Parsons
Matthew Parsons - 03.03.2023 06:33

This is pretty awesome. would have liked to see this implemented with a database, maybe sqlite or mongoose.

Ответить
Francis Ling
Francis Ling - 02.03.2023 03:41

Hi, Tim. Would you give the version of components, say Flask, flask-socketio, python-socketio, python-engineio. I encountered the compatibility problem, hasn't solved it yet. Thanks!

Ответить
Typical Videos
Typical Videos - 01.03.2023 15:45

I can't send messages

Ответить
WordWonders
WordWonders - 01.03.2023 13:14

Do this in. Django please

Ответить
Python Programmer
Python Programmer - 01.03.2023 05:57

i love when tim put out tutorials

Ответить
MrNut
MrNut - 01.03.2023 04:30

does someone have the code for the date to calculated with the server

Ответить
NicoDmx
NicoDmx - 28.02.2023 22:35

exist any extension for recognize this block and similar :" {% block content %}"
my ide dont show me information i use Vscode

Ответить
石神千空
石神千空 - 28.02.2023 19:34

I'm a new subscriber, just subscribed a few days ago, and now I'm a fan of Tim.
Tim really appreciate your work 🙇

Ответить
Axel Acer
Axel Acer - 28.02.2023 17:10

Heyy man quick question, do you think you could make a video about how to host projects such as this on local machine/raspberry pi to host it worldwide privately without using things like linode or google cp

Ответить
big loud
big loud - 28.02.2023 00:34

These python tutorials are the best tech homie tim

Ответить
twebble
twebble - 28.02.2023 00:17

Hi Tim. Do you think you can make a simple program that highlight a paint splat shape on mouse hover inside its boundary?

Ответить
VaquitaDaPlug
VaquitaDaPlug - 27.02.2023 23:04

Thanks so much, Tim!!

Ответить
Andrew Tsegaye
Andrew Tsegaye - 27.02.2023 22:54

yeah, you're the best!!

Ответить
XxXRedSn0wXxX
XxXRedSn0wXxX - 27.02.2023 22:48

Could anyone explain to me why it's quite difficult to develop proper and stable connections between clients (like for real time games)? And are there any sources of information on this topic I can read about?

Ответить
Sandarpan Mukherjee
Sandarpan Mukherjee - 27.02.2023 17:54

There's a timestamp saying JavaScript - Socket Connection right after Flask - Socket Disconnecting. Is there any JavaScript in here that we're missing?

Edit: Sorry. There IS a JavaScript section but the timestamp is missing.

Ответить
Tim James
Tim James - 27.02.2023 17:12

Really appreciated Man! Need more python projects videos✌🙌

Ответить
Mr Manto
Mr Manto - 27.02.2023 17:05

Love you sir ☺️

Ответить