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

Does Flask Socketio Support the Websocket() Function in JS?

After doing some digging, I've been trying to connect Flask Socketio with a websocket in JS by doing socket = new Websocket("ws://localhost:5000") But this wont work, I know that there is another way with Socket.io's own library, but is there any…
Artrix
  • 149
  • 10
-1
votes
1 answer

How do I emit to a specific client within a namespace, within a room?

I have a flask server using flask-socketio, and Angular frontend as a dashboard, and few clients. The dashboard (is also a client) is connected on different namespace ("/dashboard"). Similarly, the clients are also connected to a different namespace…
-1
votes
2 answers

CORS error with flask-socket.io in Chrome

So I'm trying to build a basic chat app using flask-socket.io but am running into some strange errors. Server from flask import Flask, render_template from flask_socketio import SocketIO app = Flask(__name__) app.config['SECRET_KEY'] =…
flytex
  • 98
  • 7
-1
votes
2 answers

My code shows this error whatever I try, and when I click on the link it shows there's a 404

Whatever I seem to try (using different secret keys, trying to fix small errors) this error shows when I run my code. I have tried making small changes to the code such as changing the secret key, fixing indentation, etc. However, I do not…
PepMeow
  • 1
  • 2
-1
votes
1 answer

Importing flask-socketio instance from a top level file?

I have a run.py file at the top level of my directory where I initialize flask-socketio. That file looks like this: # /run.py #!/usr/bin/env python import os from src.config import app_config from dotenv import load_dotenv, find_dotenv from…
cp-stack
  • 785
  • 3
  • 17
  • 40
-1
votes
1 answer

reading content of arraybuffer in javascript send via server (file reader api)

When I am sending blob to server but when i am sending it back to client using emit() of socketio library it is converted to ArrayBuffer(2563) [[Int8Array]] : Int8Array(2563) [100, 105, 115, 116, 114, 105, 98, 117, 116, 105, 111, 110, 32, 118, 115,…
green seek
  • 133
  • 3
  • 11
-1
votes
1 answer

How to call a flask function from server using onBlur in HTML?

I'm new to Flask and I am trying to make a simple signup page. Here is the code- {% extends 'layout.html' %} {% block body %}
Bhaskar
  • 1,838
  • 1
  • 16
  • 29
-1
votes
1 answer

breakpoints not working in pycharm

I have a flask-socketIO application where the breakpoints in my socket.py file are not working. in __init__.py i have the following code: from flask import Flask from flask_socketio import SocketIO async_mode = None app =…
user1601716
  • 1,893
  • 4
  • 24
  • 53
-1
votes
1 answer

Python Flask Broadcast Message

Using socketio in my flask app, I want to display the name of the sender and the message, but here the message only appears, and the sender's name only shows "[object object] hello" in the browser. **# server.py from flask import Flask,…
-1
votes
1 answer

flask_socketio error when trying to join_room

When calling join_room() the following exception is fired: AttributeError: 'Request' object has no attribute 'sid' Please help find the reason. here is the stack: 127.0.0.1 - - [2017-09-26 19:56:31] "GET…
-1
votes
1 answer

Python - Mysterious Double Object Instantiation

I am running into a seemingly bizarre problem that I can't figure out - I am trying to create a single object, however for some reason, two are always made. The two files control a robot i am building. App.py A flask server which receives in…
jstm
  • 420
  • 4
  • 14
-1
votes
1 answer

Flask-Socket.IO CORS issue

I am getting this error while connecting to my Flask app using socket.io GET http://127.0.0.1:5000/socket.io/?EIO=3&transport=polling&t=1450525025659-286 Request.create @ socket.io.js:2919Request @ socket.io.js:2842XHR.request @…
Zohaib Ijaz
  • 21,926
  • 7
  • 38
  • 60
-2
votes
1 answer

How to send data originally from backend flask to frontend

I have a flask backend and react front end. I am trying to send data to react every time something specific happens from a third party in backend. I have tried using socketio however data only gets sent to front end if I first sent something from…
-2
votes
2 answers

flask run command on a flask app with flask-socketio extension

I have a very simple flask application that integrates flask-socketio, and I am trying to run my server using the flask run command on my terminal. I have read the documentation and this should do the job, however the output is the following, and I…
A. Khoja
  • 57
  • 1
  • 5
-2
votes
1 answer

How to emit event to only one (or two) client in "SocketIO"

How to emit event to only one (or two) client in "Flask-SocketIO"
1 2 3
70
71