Problem: csv Import fails with "mapping missing"

ucsschool
import
problem

#1

Problem

In ucs@school the csv import fails with an error message as follows:
2019-01-04 13:29:13 ERROR user_import.read_input:115 Error reading 1. user: Columns configured in csv:mapping missing: [...]

Solution

The to be imported csv file had a byte order mark at the beginning of one line.
This caused the importer to be unable to properly read the command “A” at the beginning of the line.

The control character was seen with the tool “less import.csv” which displayed it as a Zero-width non-breaking space.

root@ucs:~# less import.csv
<U+FEFF>A       28812502        Miller    Frank   school1       school1-school-8c      0       email5402@school.domain.com         0       1       0       Town01

Removing this special character caused the import to be successful.


#2