Ok after removing the try/except I now get a different picture:
Found some accented characters in the json file. The application Deja had accented e and a.
I changed them to normal a nad e and the json now loads. This is the standard applications.json for the ubuntu-mate-welcome package which loads OK on my Ubuntu 18.04 Mate Raspberry PI system.
So why does my code fail on one system and succeed on the other when both applications.json files are the same?
So is there some python setting I can set to make accented characters acceptable?
Why are accented characters acceptable on my Ubuntu 18.04 PI but unacceptable on my Ubuntu 18.04 Odroid?
Error:Traceback (most recent call last):
File "/home/odroid/Scripts/python_import_paths.py", line 14, in <module>
index = json.load(data_file)
File "/usr/lib/python3.6/json/__init__.py", line 296, in load
return loads(fp.read(),
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 210343: ordinal not in range(128)
Does that mean there is a strange character in the json file?Found some accented characters in the json file. The application Deja had accented e and a.
I changed them to normal a nad e and the json now loads. This is the standard applications.json for the ubuntu-mate-welcome package which loads OK on my Ubuntu 18.04 Mate Raspberry PI system.
So why does my code fail on one system and succeed on the other when both applications.json files are the same?
So is there some python setting I can set to make accented characters acceptable?
Why are accented characters acceptable on my Ubuntu 18.04 PI but unacceptable on my Ubuntu 18.04 Odroid?