Ubuntu-Mate-Welcome cannot open applications.json


When I run Ubuntu-Mate-Welcome I get this error and the software boutique never populates.

IndexError: list index out of range

[Apps] Software Index JSON is invalid or missing! 

[Apps] /usr/share/ubuntu-mate-welcome/js/applications.json 

The json file is there and it validates with jsonlint.

I have tried reinstalling and both the apt and snap versions do the same.


Which version of Ubuntu MATE, and what is your system's architecture?

uname -pm

At this time of writing, the latest version should be 19.10.0.


system architecture : aarch64


Hmm, I'm not sure on that one - what's the hardware?

Also, what's the output of this?

dpkg --print-architecture

Welcome/Boutique currently only has listings for i386,amd64,armhf,arm64, so if the command above also says aarch64 then this could be why it's failing to read to index.

If so, a workaround for now is to 'pretend' you're on another architecture - but bear in mind the software may not install if the sources do not supply packages for them:

ubuntu-mate-welcome --force-arch=arm64


ouptput from dpkg ... :slight_smile:

ubuntu-mate-welcome --force-arch=arm64

Forces arm64 simulation mode but still can't read the jason file!

I'm getting the impression that the code that attempts to load the json file:

def reload_index(self):
        dbg.stdout('Apps', 'Reading index...', 1, 3)
        json_path = os.path.abspath(os.path.join(data_path, 'js/applications.json'))
        with open(json_path) as data_file:
            dbg.stdout('Apps', 'Loading!', 0, 1)
            self.index = json.load(data_file)
            dbg.stdout('Apps', 'Loaded!', 0, 1)
            dbg.stdout('Apps', 'Successfully loaded index.', 1, 2)
    except Exception as e:
        self.index = None
        dbg.stdout('Apps', 'Software Index JSON is invalid or missing!', 0, 1)
        dbg.stdout('Apps', json_path, 0, 1)
        dbg.stdout('Apps', '------------------------------------------------------------', 1, 1)
        dbg.stdout('Apps', str(e), 1, 1)
        dbg.stdout('Apps', '------------------------------------------------------------', 1, 1)

Gets to the loading but fails at self.index = json.load(data_file).

I'm wondering if the correct json module is installed!

I looked on all the python path:

['/home/odroid/Scripts', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']

But I could not identify a json module!


I have found a cause for this problem.

On my Ubuntu 18.04 aarch64/arm64 Odroid system it is refusing to read the applications.json file because that file contains accented characters.

I removed the accented characters from the Deja application entry in the json file and it now works.

However this in turn requires an explanation as to why it is not accepting accented characters when that same json file is working on my Ubuntu 18.04 arm32 PI system.


Good catch! It's definitely encoding/locales causing this, but I'm not quite sure which component would be entirely responsible -- if it's a bug in our ubuntu-mate-welcome, the json module, or a system config issue.

UTF-8 would be the encoding the software would expect to be processing with. I believe you can find out like this:

echo $LANG

Coincidentally, the other week I put Ubuntu in a container on my Android device (armhf / armv8l), and a Ruby application had problems reading certain files. Turns out I had to put this in ~/.bash_aliases to fix it:

export LC_ALL="C.UTF-8"
export LANG="en_GB.UTF-8"
export LANGUAGE="en_GB.UTF-8"

Perhaps you may need something similar to prevent this happening on that device?