RSSAmplifier

Blog

Luc's developer blog

Luc's developer blog

luc.lino-framework.orgRSS feed ↗610 posts

Latest posts

Monday, July 27, 2026

Monday, July 27, 2026 ¶ (dev) luc@ding:~$ sudo apt update [sudo: authenticate] Password: Hit:1 http://ee.archive.ubuntu.com/ubuntu resolute InRelease Get:2 http://ee.archive.ubuntu.com/ubuntu resolute-updates InRelease [137 kB] Hit:3 https://installer.id.ee/media/ubuntu questing InRelease Hit:4 http://ee.archive.ubuntu.com/ubuntu resolute-backports InRelease Get:5…

Saturday, May 30, 2026

Saturday, May 30, 2026 ¶ DaySlave is the only table tha sets use_detail_params_value to True . What does that mean? DaySlave is the base class for DailySlaveBase, WeeklySlaveBase and MonthlySlaveBase, who themselves are base for DailySlave, WeeklySlave and MonthlySlave. So these three tables are the concrete views that use this option. It means that these three tables don’t define their own…

Thursday, May 28, 2026

Thursday, May 28, 2026 ¶ In patrols1, when calview.WeeklySlave receives parameter values, it returns an empty queryset. GET http://127.0.0.1:8000/api/calview/WeeklySlave?dm=grid&fmt=json&limit=99999&lv=1779921642.6281872&mk=0&rp=weak-key-21&ul=en&wt=t GET…

Thursday, May 14, 2026

Thursday, May 14, 2026 ¶ A surprise during data migration. Loading 11734 objects to table cert_sectionresponse ... Deferred SectionResponse #358 ('Schriftbild') : 20250927 20250927 Traceback ( most recent call last ): File ".../env/repositories/lino/lino/utils/dpy.py" , line 142 , in try_save obj . full_clean () File ".../env/repositories/prima/lino_prima/lib/cert/models.py" , line 285 , in…

Explanation for mail_queue_enter: create file maildrop/870989.992: Read-only file system

Explanation for mail_queue_enter: create file maildrop/870989.992: Read-only file system ¶ Sunday, May 10, 2026 Here is what happened after mail_queue_enter: create file maildrop/870989.992: Read-only file system . NB I am still unable to send emails to the debian-user mailinglist. I sent an email to listmaster lists debian org , but they too didn’t respond. That’s another story. EDIT: I thought…

Saturday, May 2, 2026

Saturday, May 2, 2026 ¶ Today I have been playing during 2 hours with 7 postfix config parameters (myhostname, myorigin, mydestination, inet_protocols, inet_interfaces, local_transport and smtp_bind_address) on two servers (kuu and lumi). There were moments when I didn’t understand the world and had the feeling that some hidden random error generator is running somewhere… It seems that the article…

Thursday, April 30, 2026

Thursday, April 30, 2026 ¶ Today a bug in Lino Prima took me a few hours to hunt and fix. Look at this code: class Challenge ( Sequenced ):: def get_siblings ( self ): if self . exam_id : return self . __class__ . objects . filter ( exam = self . exam ) return self . __class__ . objects . filter ( project_section = self . project_section ) Above code is bad. Below is the corrected code: def…

mail_queue_enter: create file maildrop/870989.992: Read-only file system

mail_queue_enter: create file maildrop/870989.992: Read-only file system ¶ Tuesday, April 28, 2026 I’m on a virtual private server with a freshly installed Debian 13.4. The server is currently accessible via the FQDN lumi.mylino.net . I installed a list of packages like libreoffice, monit and certbot, and created a file /etc/monit/conf.d/lino.conf with the following content: # generated by getlino…

Monday, April 27, 2026

Monday, April 27, 2026 ¶ Yesterday I finally found the explanation for for #6733 (laudate server not responding and kswapd0 CPU usage at 200%), which has occupied me for more than two weeks. I found the explanation because I had summarized my problem for a Debian consultant. A typical case of “Ask, and it will be given to you; seek, and you will find; knock, and it will be opened to you.” ( Mt 7:7…

Wednesday, April 22, 2026

Wednesday, April 22, 2026 ¶ Working for #6733 (laudate server not responding and kswapd0 CPU usage at 200%). I ran diff -y over the output of postconf on lumi (left) and lf (right). Most differences seem irrelevant, but the following ones are interesting: mail_name = Postfix | mail_name = mail.lino-framework.org mydestination = $myhostname, laudate.ee, lumi, localhost.loca | mydestination =…

Monday, April 13, 2026

Monday, April 13, 2026 ¶ Working for #6733 (laudate server not responding and kswapd0 CPU usage at 200%). I’m trying to get Dovecot up and running correctly on laudate. That site was upgraded from Debian 12 to 13, but I told it to ignore my old dovecot configs because I prefer to start a setup from scratch. Doveconf configuration is split over multiple files, which makes things more maintainable…

Friday, April 10, 2026

Friday, April 10, 2026 ¶ Working for #6733 (laudate server not responding and kswapd0 CPU usage at 200%). Today I upgraded laudate from Debian 12 to 13 I made a snapshot of ets , the only production Lino site on laudate. Here is a list of the websites on laudate: $ ll /etc/nginx/sites-enabled/ total 16 drwxr-xr-x 2 root root 4096 4. dets 07:15 . drwxr-xr-x 8 root root 4096 10. apr 20:37 ..…

Saturday, March 21, 2026

Saturday, March 21, 2026 ¶ I’m still trying to understand why emails sent with farm mailto fail to arrive to my inbox when sent from nora but not when sent from LF. And OTOH emails sent from jane (on nora) do arrive to my inbox. Mail-related settings on Jane are: ADMINS : [[ 'Luc Saffre' , 'luc@saffre-rumma.net' ]] DEFAULT_FROM_EMAIL = noreply @mylino . net EMAIL_BACKEND = django . core . mail .…

Monday, March 9, 2026

Monday, March 9, 2026 ¶ I’m working on #6654 (Language switching and page_name for songbook). The only problem is that the EN page with page_name “laulud” cannot make a link to the corresponding page in ET. I want the text of the English page to say “This content is available only in Estonian”, followed by a [page 20 Click here] or [ref page:20 Click here] .…

Friday, February 20, 2026

Friday, February 20, 2026 ¶ Configure postfix for sending email via an external SMTP relay server https://dohost.us/index.php/2025/07/27/configuring-postfix-to-send-outgoing-mail-relay-hosts-and-smart-hosts/ apt-get install libsasl2-modules is needed for the authentication smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous

Sunday, January 18, 2026

Sunday, January 18, 2026 ¶ After upgrading SR from bookworm to trixie we have the issue that emails don’t work. SR accepts them but then they vanish, and the mail.log says: 2026 - 01 - 18 T13 : 48 : 22.282711 + 02 : 00 saffre - rumma postfix / postdrop [ 5083 ]: \ warning : mail_queue_enter : create file maildrop / 281740.5083 : Read - only file system The authentication seems to work, Thunderbird…

Wednesday, January 14, 2026

Wednesday, January 14, 2026 ¶ The request_handler() method ¶ The request_handler() method of an action request builds and returns the Javascript code that would execute this request on the client. It obviously depends on the front-end renderer. The publisher renderer returns None . It is needed by WrappedAction , ShowSlaveTable , RequestFieldElement , Renderer.href_to_request() . It is also needed…

Sunday, January 4, 2026

Sunday, January 4, 2026 ¶ The site_config property is now defined on the new SiteConfigCache class, which is inherited by Site as before, and also by User and AnonymousUser . The config_id attribute is renamed to tenant_id . This corresponds to the value of the SiteConfig.id . The default tenant_id is 1. On a multi-tenant site, User.tenant_id will become a database field. The today() , atoday()…

Waiting for a miracle

Waiting for a miracle ¶ Sunday, December 14, 2025 Last month brought at least four sad pieces of news for Lino: Noémy decided, after a promising first meeting, to not start using Lino. The obvious reason is the bus factor: their Lino site would have more than 200 users, and they can’t put such a responsibility on the shoulders of a almost-one-man project. Sharif wants to immigrate to Europe,…

Tuesday, November 25, 2025

Tuesday, November 25, 2025 ¶ fields needs params, actions, actors, vfields, fakefield, basefields elems needs layouts utils needs atable atable needs actors frames needs actors actors needs params, layouts, fields actions needs layouts, choosers, params layouts needs vfields, fakefield, store store needs fakefield, vfields, storefields, atomizer atomizer needs basefields, utils, storefields…

Insert a local table of contents into a HTML page

Insert a local table of contents into a HTML page ¶ Friday, October 31, 2025. How to insert a local table of contents into a HTML page? Except for some basic examples I couldn’t find something that actually inserts the TOC in a marked place, complete with backlinks, and later updates that TOC. from difflib import Differ from lino.utils.soup import sanitized_soup TOC_MARKER = "=TOC_HERE=" html =…

Wonderful world

Wonderful world ¶ Wednesday, October 29, 2025 I found the translators package and thought by myself: what a wonderful world. >>> title = "Wonderful world" >>> body = """I hear babies cry, I watch them grow, they'll learn much more than I'll ever know, and I think to myself: What a wonderful world.""" >>> html = f ''' ... <!DOCTYPE html><html><head><title> { title } </title></head> ... <body> ...…

Sunday, September 14, 2025

Sunday, September 14, 2025 ¶ User cannot set predicate or smiley directly from the as_paragraph view of ElementResponsesBySection . in the detail of an SectionResponse . rating_buttons Both methods call Ratable.get_rating_buttons on an ElementResponse to generate this HTML. set_score_action_directly is available on 4 models: ChallengeRating FinalRating ElementResponse SectionResponse The URL in…

Monday, August 18, 2025

Monday, August 18, 2025 ¶ To be meditated: What should be the default value for the group field of a PrivacyRelevant ? When an end-user writes a comment, and the group is not obvious from the context, Lino can set the user’s current_group . But if that happens to be empty as well? Okay technically the group field may be empty, but right now a comment without a group wouldn’t be visible even to its…

Friday, August 1, 2025

Friday, August 1, 2025 ¶ I’m trying to understand why Ctrl + Shift + U doesn’t work in LibreOffice on my computer. Somebody suggested to say: $ flatpak install flathub org.libreoffice.LibreOffice Looking for matches… org.libreoffice.LibreOffice permissions: ipc network fallback-x11 pulseaudio wayland x11 dri file access [1] dbus access [2] bus ownership [3] [1] host, xdg-config/fontconfig:ro,…

Saturday, July 5, 2025

Saturday, July 5, 2025 ¶ My first communication with a matrix server (after reading the specs ): import json import requests from pprint import pprint server_url = "https://matrix.org" url = server_url + "/.well-known/matrix/client" session = requests . Session () response = session . get ( url ) assert response . status_code in { 200 , 201 , 202 , 204 , 400 } pprint ( json . loads ( response .…

BeautifulSoup and lxml

BeautifulSoup and lxml ¶ Friday, July 4, 2025 When you build a BeautifulSoup from a plain text, that text was getting wrapped into a <p> tag when the installed lxml version is earlier than 6, but isn’t any more with the new version of lxml. >>> from bs4 import BeautifulSoup >>> soup = BeautifulSoup ( "Foo" , "lxml" ) The following snippet passes with lxml before 6 … >>> print ( soup ) # lxml<6…

Thursday, June 26, 2025

Thursday, June 26, 2025 ¶ I was wondering… yes there is a pitfall when using Jinja. When your class defines a property, and when, while computing this property, it raises an AttributeError , then Jinja catches this exception and reports that your object doesn’t have the requested property instead of showing the full traceback. from jinja2 import Environment , DictLoader A = False B = True class…

Monday, June 23, 2025

Monday, June 23, 2025 ¶ Rename FinalExam to FinalExamTemplate New model FinalExam(template, group)

Friday, June 20, 2025

Friday, June 20, 2025 ¶ About the doctest failures in specs/calview.rst and specs/avanti/db.rst (avanti1): The number of cal.Event changed from 278 to 533 (+155). The new events are suggested meetings with clients according to their event_policy. Explanation: the generate_calendar_entries procedure was not being run by pm prep , now it is being run. Good. About the doctest failures in…

Tuesday, June 3, 2025

Tuesday, June 3, 2025 ¶ I’m working on miscellaneous optimizations for tim2lino and Peppol. What if a customer becomes send_peppol after the onboarding date, and had already invoices sent before the onboarding date? For example I activate my customer as a supplier, they start sending invoices to some of their customers. One month later, two customers of my customer onboard and ask to receive…

Monday, May 19, 2025

Monday, May 19, 2025 ¶ Puppeteer ¶ I tried to run the puppeteer test suite in react: (dev) luc@frodo:~/work/react$ npx puppeteer browsers install chrome Downloading chrome 131.0.6778.204 - 165.9 MB [====================] 100% 0.0s chrome@131.0.6778.204 /home/luc/.cache/puppeteer/chrome/linux-131.0.6778.204/chrome-linux64/chrome (dev) luc@frodo:~/work/react$ npm test > lino_react@25.4.2 test > jest…

I tried lilyponddist

I tried lilyponddist ¶ Thursday, May 1, 2025 Today I discovered the lilyponddist package and tried it. It works: >>> import requests >>> import lilyponddist >>> import subprocess >>> url = "https://lilypond.org/ly-examples/bach-bwv610.ly" >>> src = "/tmp/tmp.ly" >>> out = "/tmp/tmp" >>> r = requests . get ( url ) >>> open ( src , "wt" ) . write ( r . text ) 4940 >>> subprocess . call ([…

Tuesday, April 22, 2025

Tuesday, April 22, 2025 ¶ Today I had the rare occasion of working on a Windows machine. I tried a few things for How to import TIM data to Lino . Here are some screenshots. Microsoft Windows [version 10.0.26100.3775] (c) Microsoft Corporation. Tous droits réservés. C:\Windows\System32>wsl --install Téléchargement en cours : Sous-système Windows pour Linux 2.4.13 Installation en cours :…

Friday, April 18, 2025

Friday, April 18, 2025 ¶ I worked on #5754 (How to install esteid digidoc on Tuxedo OS) and #6007 (eidreader test suite fails with libbeidpkcs11.so.0: No such file or directory) . Seems that both issues are related. Difficult to get help because nobody feels responsible. After finding and installing the pyasice package <https://pypi.org/project/pyasice/#quickstart> I wrote a script asice.py ,…

Thursday, April 17, 2025

Thursday, April 17, 2025 ¶ Today I continued testing Ibanity synchronization using real data in integration mode. My first error message was: No transmissionId in { 'data' : { 'id' : 'd772574a-bddb-4a7b-9b60-4921736daaca' , 'type' : 'peppolInvoice' , 'attributes' : { 'createdAt' : '2025-04-17T06:43:37.760Z' , 'errors' : [{ 'code' : 'invalid-schematron' , 'detail' : 'Belgian VAT number MUST…

Monday, April 14, 2025

Monday, April 14, 2025 ¶ For one of my demo invoices the UBL validator says: [BR-Z-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Zero rated” shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with “Zero rated”. And yes this…

Friday, April 11, 2025

Friday, April 11, 2025 ¶ I made an XML file named “VKR-2025-33.xml”, then POSTed it to https://api.ibanity.com/einvoicing/peppol/suppliers/249e6232-5d7d-4654-8547-c8b252309698/invoices ? And the response was {‘id’: ‘7031b2c6-acfa-450b-84ab-4ac557fd6f69’, ‘type’: ‘peppolInvoice’, ‘attributes’: {‘createdAt’: ‘2025-04-11T13:34:20.548Z’, ‘status’: ‘created’, ‘technicalStatus’: ‘created’},…

Python 3.13 breaks sending of emails

Python 3.13 breaks sending of emails ¶ Wednesday, April 2, 2025 TIM has a single field PAR->email with the customer’s email addresses. And TIM users know that they can put multiple email addresses into this field if they separate them by a semicolon. A semicolon?! According to RFC 5322 the correct delimiter for recipients in the To: header is the comma , not a semicolon. Yes, but a semicolon works…

Monday, March 31, 2025

Monday, March 31, 2025 ¶ Some days ago I upgraded the software for using Estonian ID cards and now eidreader is broken, inv test says: File "docs/usage.rst" , line 191 , in usage . rst Failed example : shell ( "eidreader" ) #doctest: +NORMALIZE_WHITESPACE Expected : { "eidreader_version" : "1.0.8" , "success" : false , "message" : "Could not find any reader with a card inserted" } Got : {…

Thursday, March 27, 2025

Thursday, March 27, 2025 ¶ The Ibanity staff activated our application, now I will configure Jane to use it. Creating a new application client certificate is more complicated for “live” applications than for “sandbox” applications. The developer portal asks me to generate an RSA key pair: openssl genrsa - aes256 - out private_key . pem 2048 and then to generate a Certificate Signing Request:…

Thursday, March 13, 2025

Thursday, March 13, 2025 ¶ We had another occurrence of #5965 (SyntaxError: unterminated string literal) in the daily cron job that runs pull_demos.sh on lino-framework.org . The reason was that autopep8 had transformed if response . status_code not in { 200 , 201 , 202 }: raise Exception ( f " { meth_name } { url } returned unexpected status code { response . status_code } " ) into if response .…

Monday, March 10, 2025

Monday, March 10, 2025 ¶ Collect outbound invoices into outbox Send outbound documents Check outbound documents Check our inbox No inbound documents to download. Collect outbound documents into outbox Send outbound documents Check status of sent documents Check for new inbound documents Download inbound documents. No inbound documents to download.

Thursday, March 6, 2025

Thursday, March 6, 2025 ¶ I’m working on #5964 (pm prep in avanti1 says ‘str’ object has no attribute ‘get_layout_handle’) In lino_xl/lib/courses/models.py we had: @dd . requestfield ( _ ( "Enrolments" )) def enrolments ( self , ar ): return self . get_enrolments ( start_date = dd . today ()) def get_enrolments ( self , ** pv ): return rt . models . courses . EnrolmentsByCourse . create_request (…

Thursday, February 27, 2025

Thursday, February 27, 2025 ¶ The Ecosio validator says “[BR-CL-17]-Invoice tax categories MUST be coded using UNCL5305 code list”, but there are two such code lists: A and B . One of them has a code “AA” for reduced VAT and the other one hasn’t. And my invoice contains indeed a line with reduced VAT. Explanation: Haha! I was asking a rule set for Australia and New-Zealand. With the “UBL Invoice…

Wednesday, February 26, 2025

Wednesday, February 26, 2025 ¶ Element/context: Error message: cac:InvoiceLine[1]/cbc:InvoicedQuantity[1] [BR-CL-23]-Unit code MUST be coded according to the UN/ECE Recommendation 20 with Rec 21 extension cac:TaxTotal[1]/cac:TaxSubtotal[1]/cac:TaxCategory[1]/cbc:ID[1] [BR-CL-17]-Invoice tax categories MUST be coded using UNCL5305 code list…

Saturday, February 22, 2025

Saturday, February 22, 2025 ¶ I am meditating on how to integrate into Lino the Participant Identifier Schemes published as part of the OpenPeppol eDEC Code Lists . For example the <cbc:EndpointID> for my employer Rumma & Ko OÜ is: < cbc : EndpointID schemeID = "9931" > 100588749 </ cbc : EndpointID > The 9931 is the ICD value of item 68 of the list of Participant Identifier Schemes, which has…

Wednesday, February 19, 2025

Wednesday, February 19, 2025 ¶ How to reinstall my Lino developer environment after dist-upgrade ¶ I did “pip freeze > 20250218.txt” before the dist-upgrade, but then didn’t use it because I preferred to say: go getlino pip install - e . getlino configure I had a series of SyntaxWarning “invalid escape sequence” in a few files because my Python is now Python 12 (it was 3.10 before). There is a…

Tuesday, February 18, 2025

Tuesday, February 18, 2025 ¶ How to validate a Peppol XML file ¶ crux (“Command-line Refuter of Unshapely XML”) is a command-line tool “for XML schema and Schematron validation for any platform with a Java runtime”. $ sudo apt install default-jre $ java -v openjdk version "11.0.26" 2025-01-21 OpenJDK Runtime Environment (build 11.0.26+4-post-Ubuntu-1ubuntu122.04) OpenJDK 64-Bit Server VM (build…

Friday, February 14, 2025

Friday, February 14, 2025 ¶ I continued to explore the Ibanity API . Thanks to Geoffrey who answered my questions on their support platform. Q: The Ibanity API documentation has three very similar sections about outbound documents: Invoice , Credit Note and Document . Everything seems to be the same for these three sections, except for the value of type . Why is this differentiation? A: The…