Fresh install fails on ubuntu 22.04 with v69b in migrate.py

I’m sure this is most likely something I’m doing, but following the basic install instructions it fails in migrate.py:

curl https://mailinabox.email/setup.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3021  100  3021    0     0  13373      0 --:--:-- --:--:-- --:--:-- 13367
Downloading Mail-in-a-Box v69b. . .

Traceback (most recent call last):
  File "/root/mailinabox/setup/migrate.py", line 271, in <module>
    run_migrations()
  File "/root/mailinabox/setup/migrate.py", line 227, in run_migrations
    ourver = int(migration_id)
ValueError: invalid literal for int() with base 10: ''

Is this just me?

Try

curl -s https://mailinabox.email/setup.sh | sudo -E bash

The tiny details sometimes matter :wink:

Hi Andrew,

Thanks for the response!

Tried adding the -E, but no difference I’m afraid:

curl -s https://mailinabox.email/setup.sh | sudo -E bash
Downloading Mail-in-a-Box v69b. . .

Traceback (most recent call last):
  File "/home/notroot/mailinabox/setup/migrate.py", line 271, in <module>
    run_migrations()
  File "/home/notroot/mailinabox/setup/migrate.py", line 227, in run_migrations
    ourver = int(migration_id)
ValueError: invalid literal for int() with base 10: ''

Also in my defence, the comment block at the top of the bootstrap.sh file doesn’t have the -E :smiley:

#########################################################
# This script is intended to be run like this:
#
#   curl https://mailinabox.email/setup.sh | sudo bash
#
#########################################################

Solved it, this was caused by an empty file at /home/user-data/mailinabox.version. Not sure how that got there, but it will have been me faffing that caused it I’m sure.

Looking in migrate.py, lines 217 and 222 check for None but not for an empty string or non-numeric string.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.