Wednesday, July 15, 2020

Fixed several problems when building the book docs (inv clean -b bd).

WARNING: [autosummary] failed to import ‘lino_avanti.lib.avanti.user_types’: no module named lino_avanti.lib.avanti.user_types

How to reproduce it:

$ python -c "import lino; lino.startup('lino_book.projects.max.settings.doctests'); import lino_avanti.lib.avanti.user_types"

Explanation: The lino_xl.lib.uploads plugin didn’t work when lino_xl.lib.clients.Plugin.client_model was not a subclass of ClientBase. Because the coached_by parameter field wasn’t created at all. Now it gets created as a dummy field.

Also the memo parser refused to have a second renderer for a same model. But that’s a legitimate thing happening when lino_xl.lib.clients.Plugin.client_model was as its default value ‘contacts.Person’: we then have two memo commands person and client both pointing to the same model. Which is actually no problem. It just means that the inverse mechanism (rendering a given database object as a memo command) will yield one of them.

ResourceWarning: unclosed file <_io.BufferedReader name=’/home/luc/work/lino/lino/modlib/languages/fixtures/iso-639-3_20100707.tab’>

–> Fixed some more causes for ResourceWarning, but then removed the line (in lino/__init__.py) that turns the warning into an error.

intersphinx inventory has moved: http://www.sphinx-doc.org/en/master/objects.inv -> https://www.sphinx-doc.org/en/master/objects.inv

–> Changed http to https for diverse intersphinx_urls

Configuring mailman lists for laudate

Our first mailman 3 server at https://lists.laudate.ee/postorius/lists/ was saying:

Something went wrong
Mailman REST API not available. Please start Mailman core.

In /etc/mailman/mailman.cfg I changed use_https from no to yes:

# Whether or not requests to the web service are secured through SSL.
use_https: yes

I read Mailman 3 Core REST API.

But that document tells me e.g. to run the “mailman info” command, and such a command does not exist. Solution:

$ cd /opt/mailman/venv
$ . bin/activate

Hamza installed the Mailman Suite into /opt/mailman.

The /etc/nginx/sites-available/mailman.conf defines the nginx site

The /etc/supervisor/conf.d/mailman.conf defines the postorius django app

The /opt/mailman/mailman-suite/mailman-suite_project/uwsgi.ini