Airnotifier: No module named 'tornado'

Airnotifier: No module named 'tornado'

by Javier Tejera -
Number of replies: 4

Hi there,

I am following these instructions to set up Airnotifier and push notifications in a branded app. Everything works like a charm locally, but it does not on an AWS EC2 Ubuntu 20.04 (Moodle 3.10.1).

I start the Airnotifier app by running sudo pipenv run ./app.py but 'tornado' is not found (see below). So I ran python3 -m pip install tornado and it's been successfully installed. However, the app is not working yet.

Any idea on how to proceed?


Traceback (most recent call last):

  File "./app.py", line 32, in <module>

    from pushservices.bootstrap import init_messaging_agents

  File "/home/ubuntu/airnotifier/pushservices/bootstrap.py", line 2, in <module>

    from .apns import *

  File "/home/ubuntu/airnotifier/pushservices/apns.py", line 5, in <module>

    from util import json_encode

  File "/home/ubuntu/airnotifier/util.py", line 37, in <module>

    import tornado

ModuleNotFoundError: No module named 'tornado'

Average of ratings: -
In reply to Javier Tejera

Re: Airnotifier: No module named 'tornado'

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi,

have you installed all the requeriments? tornado is a module you need to install

Regards, Juan
In reply to Juan Leyva

Re: Airnotifier: No module named 'tornado'

by Javier Tejera -
Hi Juan,

I have indeed installed the tornado module and the requirement was satisfied, but still was having the same issue.

This did the trick and now it works fine: sudo apt-get install python-is-python3
In reply to Javier Tejera

Re: Airnotifier: No module named 'tornado'

by Amira Elsayed -
I an having the same issue, and tried your solution but it does not work
In reply to Amira Elsayed

Re: Airnotifier: No module named 'tornado'

by Javier Tejera -
Hi Amira, it's been a few months, so I don't remember exactly. However I had to start the whole process again a few times. Just try from scratch and fingers crossed!