Backup Status Every Night - running ARM Duplicity from SNAP - Resolved

How do I get rid of this messages every night: Backups are working fine and this is not the version the MIAB is running.

sudo python3 --version
Python 3.10.12

Starting deprecation of python 3.8 support. Support for python 3.8. will finally removed with the release of 3.14.  For details see https://devguide.python.org/versions/

Not sure why that message is there. But you might be able to filter it using something like this

You might also want to check /usr/local/lib/mailinabox/env/bin/python --version which for me is also 3.10.12

Thanks. Will do that.
It is Python 3.10.12 /usr/local/…/python

Using the suggestion above, I modified the management/daily_tasks.sh file like so:

#!/bin/bash
# This script is run daily (at 3am each night).

# Set character encoding flags to ensure that any non-ASCII
# characters don't cause problems. See setup/start.sh and
# the management daemon startup script.
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8

# On Mondays, i.e. once a week, send the administrator a report of total emails
# sent and received so the admin might notice server abuse.
if [ "$(date "+%u")" -eq 1 ]; then
    management/mail_log.py -t week | management/email_administrator.py "Mail-in-a-Box Usage Report"
fi

# Take a backup.
export DUPLICITY_PYTHON_WARNING="Starting deprecation of python 3.8 support. Support for python 3.8. will finally removed with the release of 3.14.  For details see https:\/\/devguide.python.org\/versions\/"
management/backup.py 2>&1 | sed 's/'"$DUPLICITY_PYTHON_WARNING"'//g' | management/email_administrator.py "Backup Status"

# Provision any new certificates for new domains or domains with expiring certificates.
management/ssl_certificates.py -q  2>&1 | management/email_administrator.py "TLS Certificate Provisioning Result"

# Run status checks and email the administrator if anything changed.
management/status_checks.py --show-changes  2>&1 | management/email_administrator.py "Status Checks Change Notice"

This absolutely won’t survive an update, but perhaps it will survive until the deprecation message stops blaring at us.

1 Like

Thanks @mokiejovis this even more intuative. Are you getting the message as well?

Yes. I suspect the snap install we’re using has something to do with it, but I don’t know why that one would report the python deprecation, but the apt-based install would not.

The only snap install I have is duplicity since I am on ARM. Not sure but thanks anyway.

The warning is coming from duplicity. Run duplicity --help | head -n1 and see for yourself.

You are right:

duplicity --help | head -n1
Starting deprecation of python 3.8 support. Support for python 3.8. will finally                                                   removed with the release of 3.14.  For details see https://devguide.python.org/

I did not realize that the snap version of duplicity uses its own python:
Now i get this error message. Backup via snap duplicity is failing now:


Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = '/snap/duplicity/534//usr/local/duplicity.venv/lib/python3.12/site-packages:/snap/duplicity/534/usr/lib/python3/dist-packages'
  program name = '/snap/duplicity/534//usr/local/duplicity.venv/bin/python3.12'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = '/usr/lib/python3.12'
  sys._base_executable = '/snap/duplicity/534/usr/local/duplicity.venv/bin/python3.12'
  sys.base_prefix = '/usr'
  sys.base_exec_prefix = '/usr'
  sys.platlibdir = 'lib'
  sys.executable = '/snap/duplicity/534/usr/local/duplicity.venv/bin/python3.12'
  sys.prefix = '/usr'
  sys.exec_prefix = '/usr'
  sys.path = [
    '/snap/duplicity/534/usr/local/duplicity.venv/lib/python3.12/site-packages',
    '/snap/duplicity/534/usr/lib/python3/dist-packages',
    '/usr/lib/python312.zip',
    '/usr/lib/python3.12',
    '/usr/lib/python3.12/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000e86620ac3720 (most recent call first):
  <no Python frame>
Something is wrong with the backup: