Issue 1:
The .mobi file of the documentation has gone missing, does anyone know the whereabouts of it?

EDIT: #841

Issue 2:
I'm trying to use mido package with flask. I noticed a couple issues.

mido.get_input_names() : doesn't recognize a new ports that opened after the flask server started.

If a port closed (ex: VMPK Output) after it was called by, calling the same function mido.get_input_names() throws the subject error (even it is abrowser page refresh or a form submit.

Thought, this could be an issue with mido, I opened a ticket there.

But the same code works fine in Quart framework though]

Expected Behavior (for #. 1)

import mido
from flask import Flask, jsonify

app = Flask(__name__)

@app.route('/')
def home():
return jsonify({'message': mido.get_input_names()})

# Home Page loading for the first time :
#........ ['IAC Driver Bus 1', 'Network Session 1']

# Open `VMPK` and Refresh the page:
#....... Expected Output: ['IAC Driver Bus 1', 'Network Session 1', 'VMPK Output']

Actual Behavior

['IAC Driver Bus 1', 'Network Session 1']

Expected Behavior (For #. 2)

# Open `VMPK`; Start the `app`; Home Page loading for the first time :
#........ ['IAC Driver Bus 1', 'Network Session 1', 'VMPK Output', 'VMPK Output']

# *Close* `VMPK`; Refresh the browser
#....... Expected Output: ['IAC Driver Bus 1', 'Network Session 1']

Actual Behavior

TypeError
TypeError: '<' not supported between instances of 'NoneType' and 'str'

Traceback (most recent call last)
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/dacodekid/dev/flask-issue/app.py", line 9, in home
return jsonify({'message': mido.get_input_names()})
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/mido/backends/backend.py", line 169, in get_input_names
devices = self._get_devices(**self._add_api(kwargs))
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/mido/backends/backend.py", line 163, in _get_devices
return self.module.get_devices(**self._add_api(kwargs))
File "/Users/dacodekid/dev/flask-issue/venv/lib/python3.8/site-packages/mido/backends/rtmidi.py", line 55, in get_devices
for name in sorted(input_names | output_names):
TypeError: '<' not supported between instances of 'NoneType' and 'str'
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Environment

Python version: 3.7.3

Flask version: 1.1.2

Werkzeug version: 1.0.1

Pip packages

click==7.1.2
Flask==1.1.2
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.1.1
mido==1.2.9
python-rtmidi==1.4.1
Werkzeug==1.0.1