openMittsu icon indicating copy to clipboard operation
openMittsu copied to clipboard

Data back-up import fails due to missing "color" field in the contacts list

Open davidfoerster opened this issue 1 year ago • 0 comments

I tried to import a Threema data back-up which failed. The GUI message wasn't very helpful but stderr was:

[2024-10-13 13:27:55.162] [main] [warning] Expected field color, but header only contains columns publickey,firstname,nick_name,identity_id,archived,tacid,hidden,lastname,acid,verification,identity.

I was able to work around the issue by appending an additional column with the header color and all empty values. Essentially:

mv contacts.csv contacts.csv.bak
{
  read -r line
  printf '%s,"color"\n' "$line"
  while read -r line; do 
    printf '%s,""\n' "$line
  done
} < contacts.csv.bak > contacts.csv

davidfoerster avatar Oct 13 '24 13:10 davidfoerster