Project

General

Profile

Segnalazione #796

Segnalazione #788: Fare pacchetto .deb

tornado.gen.BadYieldError nell'App in jessie

Added by Elena Grandi about 5 years ago. Updated about 5 years ago.

Status:
Chiuso
Priority:
Normale
Assignee:
Target version:
-
Start date:
04/10/2019
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

I test lanciati con nose2-3 tests.test_webserver.TestWebAPI falliscono perché la response è 500 a causa di un tornado.gen.BadYieldError: yielded unknown object <generator object get at 0x7faafcf131f8>

Ho indagato in particolare su nose2-3 tests.test_webserver.TestWebAPI.test_ping (gli altri sembrano uguali) e visto che server.RestGET viene istanziata e initialize@ata con successo, mentre la @get non viene mai eseguita

Associated revisions

Revision 2b826f47 (diff)
Added by Elena Grandi about 5 years ago

Further compatibility with old tornado. refs: #796

Revision 8c5ff3ed (diff)
Added by Elena Grandi about 5 years ago

Fix calling of async WebAPI methods. refs: #796

History

#1

Updated by Enrico Zini about 5 years ago

  • Assignee changed from Enrico Zini to Elena Grandi

Aargh! La so.

Dove c'è:

class …(tornado.web.RequestHandler):
    @asyncio.coroutine
    def get(self, **kwargs):
        yield from foo()

Prova a sostituire con:

from tornado.platform.asyncio import to_tornado_future

class …(tornado.web.RequestHandler):
    @gen.coroutine
    def get(self, **kwargs):
        yield to_tornado_future(foo())
#2

Updated by Elena Grandi about 5 years ago

  • Description updated (diff)

(fix del primo test nella descrizione)

#3

Updated by Elena Grandi about 5 years ago

  • Status changed from Nuovo to Commenti
  • Assignee changed from Elena Grandi to Enrico Zini

Con quel suggerimento i test di tests.test_webserver.TestWebAPI sono a posto, grazie.

Riassegno per review && merge: il branch è oldasync (dato che era stato creato prima del ticket)

#4

Updated by Enrico Zini about 5 years ago

  • Status changed from Commenti to Chiuso

Visto, mergiato! Chiudo.

Also available in: Atom PDF