The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [tornado]

Tornado is a scalable web server and web framework for Python specializing in handling thousands of simultaneous connections and real-time services.

0
votes
0answers
6 views

restrict access to certain files, folders in python tornado web server

I'm launching a tornado web server in python3, here's some simplified startup code: import tornado.ioloop, tornado.web root = os.path.dirname(__file__) startPage = 'index.html' class allStops(...
2
votes
1answer
22 views

WebSocket Handler on_close method async Implementation tornado

I am working on building a web application using tornado version 6.0.2. I am using WebSocket handler for setting up the connection with the client. Sample Server-side Implementation: from tornado ...
1
vote
0answers
29 views

await function in Python

So this is some code i have in my python file, the details of the code aren't that important, I basically use this MainHandler to deal with some requests sent to it by a connection "client". class ...
0
votes
0answers
18 views

Tornado testing with timeout response

actually i've 2 tornado running on 1 machine and from time to time they got frozen. I'm coding a script to test the response of them or the timeout but with no luck. I tried python3 -m tornado....
0
votes
1answer
20 views

Can you detect how well a client is keeping up with a stream of websocket messages?

I'm writing a video streaming service, and was thinking of streaming video via websockets. A problem I foresee is that the client has insufficient bandwidth to receive the stream, so I want to be ...
1
vote
1answer
28 views

Different behaviour for Yield and Await in case of RequestHandler write ( Tornado Web Framework )

I am using RequestHandler for making Web Based call using Tornado Web framework. Previously I was using Tornado Version 5.1.1 which supported @gen.coroutine and yield. I am moving my tornado version ...
0
votes
0answers
17 views

How to make multiple connection and achieve multiple requests in tornado?

How can I add multiple users in tornado? How multiple requests can be done by users?
0
votes
1answer
10 views

Duplicate logging issue in a python tornado app

I am running a python (v 3.6) tornado app (I believe the latest version 6.x). I am trying to remove my print() statements and use a logging module instead. First I created this get_logger() function: ...
-1
votes
1answer
23 views

Too many open files when using nginx + tornado to handle 5000 websocket connections

I'm testing my tornado gateway server which handles 5000 connections well without nginx. Then I add nginx and run 2 servers to handle 5000 connections. Unfortunately [Errno 24] Too many open files ...
0
votes
0answers
33 views

Tornado - Bad File Descriptor ioloop.py issue

I've recently re-started one of my older projects with the goal of automatisation of deployment of a certain server codebase for a game. When I reinstalled the VPS and attempted to deploy the server ...
0
votes
0answers
25 views

HTTPS Get Request in Python/Tornado handshake problem

So basically, I have three main components in my system, I will call them client, superProxy and proxyClient, all of them implemented in python files. In the client component I just use the library ...
0
votes
1answer
27 views

Python script DB connection as Pool not working, but simple connection is working

I am writing a script in python 3 that is listening to the tunnel and saving and updating data inside MySQL depend on the message received. I went into weird behavior, i did a simple connection to ...
1
vote
0answers
25 views

How to get all jobs running on TornadoScheduler?

I am using TornadoScheduler of APScheduler python package and trying to get current running jobs. Job configuration: ... scheduler = TornadoScheduler() def job(): while True: print('...
0
votes
1answer
31 views

Facing issue coroutine 'AsyncSocketClient.connect' was never awaited Tornado ( Socket )

I am working on establishing a socket connection ( Tornado Web framework. ) My Code: main.py def main(): io_loop = tornado.ioloop.IOLoop.instance() decoder = AsyncSocketClient(host = "...
0
votes
1answer
37 views

PyMySQL==0.7.11, MySQL server has gone away

I have an application written on Python Tornado framework. I wrote a script that is listening for the messages via tunnel, and when my conditions are satisfied the script connects to MySQL and doing ...
0
votes
1answer
26 views

Why doesn't my tornado application work?(tornado-blog with aiomysql)

import tornado.ioloop import tornado.web import tornado.options import tornado.locks import os.path from tornado.options import define, options from aiomysql import create_pool define("port", ...
2
votes
0answers
47 views

How to fix 'Install tornado itself to use zmq with the tornado IOLoop.' warning in Python

I've been following this (https://developer.ibm.com/tutorials/se-distributed-apps-zeromq-part2/) tutorial for setting up a ZeroMQ client/server setup which uses CurveZMQ to encrypt messages. The code ...
0
votes
1answer
18 views

How to get the number of pending task in ioloop in tornado?

I'm testing a gateway server for websocket client connection. I currently open 10000 clients to connect and send messages to my gateway server, and it echos back all the messages. When I type 'ctrl +...
0
votes
1answer
26 views

Prometheus endpoint organization and manage

My task is set up monitoring by using Prometheus. The whole idea is next: each time Prometheus make scrape from end-point (i.e makes GET request), on the web-server (now it's just Tornado) starts ...
0
votes
0answers
18 views

How can I implement SOAP Server in Python with Zeep ? Is that even possible?

I am trying to implement a SOAP server web service in Python (ideally 2.7 but 3.x is fine)which will ultimately be deployed in Google cloud appengine. The wsdl has already been defined. In the past,...
0
votes
1answer
27 views

Tornado 4.x solution of running game on ThreadPoolExecutor not working anymore. Need help refactoring it

My ThreadPoolExecutor/gen.coroutine(tornado v4.x) solution to circumvent blocking the webserver is not working anymore with tornado version 6.x. A while back I started to develop an online Browser ...
0
votes
1answer
58 views

tornado v6 seems to have dropped tornado.web.asynchronous coroutine. any different way of fixing this in code?

Migrated torando v5.1 to v6. but asynchronous coroutine seems to have removed. Any suggestions for its fix? Migrating the project from 2.7 to 3.6, at the same time moving tornado framework from v5.1 ...
1
vote
1answer
34 views

Python code for DynamoDB query is working on v3.6 but not working in python 2.7

I have a DynamoDB query with boto3 framework, which works on my local machine running Python 3.6, but not my server running Python 2.7. The working code on my local machine: dyndb = boto3.resource('...
0
votes
1answer
22 views

Flask/Bokeh/Tornado6.0.2: Embedded bokeh servers no longer work after Tornado update

I have numerous Bokeh Server files in a directory say.. /dir/bokeh/, assume the bokeh servers are called bokeh1.py, bokeh2.py, bokeh3.py The file structure is like so: |--dir |---flask.py |---...
0
votes
1answer
42 views

Multiple POST request handling concurrently in Python 2.7

I have a tornado server listening to port 6789 for POST requests on "/train" and "/predict". train method might take upto 3 hrs to complete, while predict might return in 2 minutes. I want them to be ...
0
votes
1answer
27 views

Tornado AsyncHTTPClient performance degradation

Setup: Python 2.7.15, Tornado 5.1 I have a web-server machine that handles ~40 /recommend requests per second. The average response time is 25ms, but there's a big divergence (some requests can take ...
0
votes
1answer
50 views

ModuleNotFoundError: No module named 'tornado'

RESTART: C:\Users\alanp\AppData\Local\Programs\Python\Python37-32\FirstDayTornado.py Traceback (most recent call last): File "C:\Users\alanp\AppData\Local\Programs\Python\Python37-32\...
0
votes
1answer
85 views

An error ocurred while starting the kernel (connected with tornado)

I just installed tensorflow framework and now I can't run my code in spyder IDE. It writes VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed....
0
votes
1answer
38 views

Deploy Python app to Heroku with extra pip install

I'm trying to implement Deploy to Heroku functionality for my Python application: https://github.com/jet-admin/jet-bridge/tree/heroku It woks OK if just use requirements.txt to install dependencies, ...
0
votes
1answer
29 views

Multiple Bokeh Server Integration To Flask

I am trying to run multiple Bokeh servers in the flask app , the plots function correctly on their own using method like this: def getTimePlot(): script = server_document('http://localhost:5006/...
0
votes
1answer
19 views

Is Tornado.WebSocketHandler.on_message guarantee receive a whole message, nothing more or less?

I was worried about the fragmentation. Not sure whether Tornado.WebSocketHandler.on_message receive a whole message or not...
6
votes
3answers
197 views

Running a Tornado Server within a Jupyter Notebook

Taking the standard Tornado demonstration and pushing the IOLoop into a background thread allows querying of the server within a single script. This is useful when the Tornado server is an interactive ...
0
votes
0answers
28 views

How I can know count of unfinished requests in python Tornado server?

I have a Tornado application and some request handler which can process one request in ~5 sec. Sometimes I can get many (dozens) requests at the same time. In this cases it looks like Tornado puts ...
0
votes
0answers
17 views

Inheritance - Does tornado.gen.coroutine decorator apply to overridden methods? [duplicate]

Say I have a class: import tornado.gen import tornado.web class BaseHandler(tornado.web.RequestHandler): @tornado.gen.coroutine def get(self): """Override this method""" ...
0
votes
1answer
20 views

How to properly replace @pytest.mark.gen_test after pytest upgrade to 4.0.2?

I have tornado co-routines tests that passed under pytest 3.8.2, but recently I've upgraded to 4.0.2 and now I get these tests failed with the following message. @pytest.mark.tryfirst def ...
0
votes
0answers
36 views

How can I dynamically change the type of tweets that are being streamed and figure out which message to send to who?

App Description So I'm trying to create an application that does real-time sentiment analysis on tweets(as close to real time as I'm able to get it) and these tweets have to be based on user input. ...
0
votes
1answer
65 views

Can't uninstall Tornado with pip

I installed Tornado sudo easy_install tornado then it got a lot of syntax errors. I want to uninstall Tornado pip uninstall tornado Then it asks: Uninstalling tornado-6.0.1: Would remove: /...
0
votes
1answer
24 views

how to use coroutine in tornado as a global initialize request handler

i want to use a base requestHander to get the global arguments from redis before all request(GET、POST..) ,and i use coroutine in tornado web as async&await. but i use aredis to client redis-server ...
0
votes
0answers
13 views

files uploaded using stream_request_body decorator are corrupted

I'm writing a server that will allow me to upload files up to 1GB. I've come up with this: import tornado.web import tornado.ioloop import tornado.gen MB = 1024 * 1024 GB = 1024 * MB TB = 1024 * GB ...
0
votes
0answers
22 views

Why would I get an error by importing tornado tcpserver?

I got an error when I import tornado TCPServer module like this... from tornado.tcpserver import TCPServer And I get error info like this... Traceback (most recent call last): File "<stdin&...
1
vote
0answers
62 views

Python Memory Leak with pyzmq and tonardo

my application use pyzmq work with tornado, main work is just like a task center. The memory will increase into 6G when task is busy, but when i stop task request and after all zmq task finished, the ...
0
votes
1answer
44 views

how to send data through websocket via custom loop “while”

I am trying to establish a connection between a Python server code that generate data and a javascript client that display it. All answer that I see are by redefining some class and you need quiet ...
0
votes
1answer
29 views

What is the difference between <package name> and python-<package name>?

I want to downgrade tornado to a previous version because the new one causes an error according to the answers here: Jupyter notebook kernel not connecting. I am on Ubuntu, in a virtual environment. ...
0
votes
2answers
48 views

Performing long running compute intensive operation on background thread

I have written a REST API in Python Tornado framework which predicts the answer of a question from a given paragraph. Here is the Python code for the Tornado handler: def post(self): """ ...
1
vote
1answer
27 views

How to launch a background task in tornado, which will not block request handling? [duplicate]

I'm writing a service which consume a disk space and have to clean it from time to time. Before this moment cleaning was performed in request handling. Unfortunately, in case when there is a big disk ...
1
vote
0answers
43 views

Returning 204 No Content from flask's view func

I have this server code, where i use 'add_url_rule' to add a view func. app = connexion.App(__name__, specification_dir='./swagger/') app.add_url_rule('/etsiproxy/notify/<vnf_id>...
0
votes
0answers
25 views

tornado - how to return a tar.gz from tornado handler

I am trying to return a tar.gz file that I created (using tarfile library) from tornado GET server handler so I can later use it as new File([test.tar.gz]) from my client. I am using the code below, ...
2
votes
1answer
58 views

Jupyter notebook cannot start with python 3.8 in Windows 10

Here is the detailed error when launching jupyter notebook with python version 3.8 File "c:\users\kokat\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main ...
2
votes
0answers
47 views

Mixed results implementing letsencrypt server cert

Summary: Why is macOS curl able to fetch my letsencrypt service, but other tools/OS aren't able to verify the certificate? I have a tiny REST service implemented in tornado using letsencrypt certs ...
1
vote
1answer
33 views

Python multithreaded server and asynchronuous websocket communication with Android clients

I have an Android client app that sends some data to a server in Python, where the Python server is supposed to run a long time-consuming operation/computation and return the results to the client. ...