Questions tagged [flask-socketio]

Flask-SocketIO lets Flask python applications access low latency bi-directional communications between the clients and the server

Flask-SocketIO is an open source library which implements the abstraction, for delivering low latency client-server communication in a application developed by Miguel Grinberg.

1052 questions
-1
votes
1 answer

how to call functions/objects from another process

Summarize the problem I have a flask server (with endpoints and socket events) and a discord bot, both work independently, I want to run them on parallel so I can trigger functions of the bot from a flask endpoint. Describe what you have tried For…
Carepollo
  • 37
  • 1
  • 6
-1
votes
2 answers

TypeError: Object of type Response is not JSON serializable (2)

I have been trying to serialize an SQLAlchemy model so that I can pass a number of data from flask server to an html socketio client. I am trying the following where an object is frirst converted into a dictionary and then jsonified. However, this…
user366312
  • 16,949
  • 65
  • 235
  • 452
-1
votes
1 answer

Is it possible to use two separate event handler functions on the server side?

In the supplied source code, The client-side has two event-handlers: connect and server_to_client. When the page loads for the first time, the connect emits texts: hello! and world!. Then, on the server side, the function server_to_client()…
user366312
  • 16,949
  • 65
  • 235
  • 452
-1
votes
2 answers

How can I send a message from server to client using socketIO?

I want to send a message from server app to the html page. So, I wrote the following code. However, the html page is showing nothing. What am I doing incorrectly? server_sends_client_receives.py from flask import Flask, render_template from…
user366312
  • 16,949
  • 65
  • 235
  • 452
-1
votes
1 answer

FLask Blueprint and SocketIO not listening to events

I'm building a simple chat application with Flask and SocketIO. The user enters a username and a room key to join a room and start chatting. In the beginning, I could make the sockets work to send and receive messages. However, at that moment I was…
Javs
  • 1
-1
votes
1 answer

How do i run a flask_socketio application with ssl enabled?

Hello im trying to run a flask_socketio application with ssl. The Code: if __name__ == '__main__': socketio.run(app, host="0.0.0.0", port="80", debug=True, ssl_context=context) The Error: * Restarting with stat * Debugger is active! *…
Spaffel
  • 1
  • 1
-1
votes
1 answer

Python flask socketio with discord.py

I am trying to have a server that will be able to give us the status on discord. I did achieve this by having an extra socketio client that run discord.py aswell. I would like discord to run on the server instead of on a client. I am unable to make…
Farid Fakhry
  • 354
  • 1
  • 10
-1
votes
1 answer

Data Array in HTML Script is not updating in flask when dynamic data is sent

I am using python Flask to build an application. When i give static data to array [] ran, azi it gets updated in the HTML Script console log, but when i dynamically update this array the data of the array in Javascript of HTML is not updated in the…
-1
votes
1 answer

Common file structure with flask and Flask-SQLAlchemy

I'm building a flask app that retrieves data from a website, store the data on Flask-SQLAlchemy db and display the data. I wrote a script to do all of them but I've to run the files individually to achieve that. my files structure: -myapp …
haben
  • 65
  • 4
  • 15
-1
votes
1 answer

Flask / SQLAlchemy - Database Connection Leak - How to debug?

I have a Flask Application and I am using SQLAlchemy as an ORM. Unfortunately, Im running into the problem that I get the error: "psql: FATAL: remaining connection slots are reserved for non-replication superuser connections". I have increased the…
Al Nikolaj
  • 305
  • 4
  • 13
-1
votes
1 answer

Is flask-socketio slow or am I missing something?

all! I am developing an application which receives data from a temperature sensor and prints it dynamically in a flask-served webpage at localhost:5000. To receive the data from the temperature sensor, an udp server is employed. The receive function…
-1
votes
1 answer

web camera accessibility over local network for face recognition

I want to create a face recognition app with Flask that will be accessible over the local network so other devices can access, the frames from the video stream will be sent to Flask server via socket io connection but the problem is camera access is…
-1
votes
1 answer

flask web socket not connecting

i am trying to connect websocket in flask(1.1.2) with Flask-SocketIO(5.0.1) but it give 400 error to websocket url. i`m using anaconda virtual environment. from flask import Flask, render_template from flask_socketio import SocketIO app =…
Lokesh sahu
  • 149
  • 1
  • 1
  • 8
-1
votes
1 answer

Flask socket(server-side) is not connecting with client-side (Javascript)

The client-side isn't connecting with the server-side. THE SERVER-SIDE CODE: from flask import Blueprint, render_template from hook.routes.auth import login_required # from flask_socketio import emit, join_room, leave_room from .. import…
-1
votes
1 answer

Flask app working on local server but not globally

These are my routes and some functions: from flask import Flask, render_template, Response import cv2 import time from sys import stdout from flask_socketio import SocketIO import math import numpy as np import logging import os from camera import…
udit_kumar
  • 66
  • 6