TLDR
- Error:
None is not of type 'object'- Cause: Missing
"classes"section in the configuration file.- Fix: Add
"classes": {}to your JSON file.- Verification: Use
jqto check syntax and structure.By including the mandatory
classesblock, you ensure the configuration passes schema validation and the import job can proceed successfully.
Problem
When configuring user imports in UCS@school, you may encounter the following error during a test run:
An error occurred while preparing the import job: Schema validation failed for configuration file '/var/lib/ucs-school-import/jobs/2025/102/3_user_import.json': None is not of type 'object'
This error usually indicates that your JSON configuration file is missing a required section.
Example
The configuration file (3_user_import.json) looked like this:
{
"csv": {
"mapping": {
"Vorname": "firstname",
"Nachname": "lastname",
"Klassen": "school_classes",
"Schule": "school",
"Merkmal": "record_uid"
}
},
"scheme": {
"username": {
"default": "<school><:umlauts><firstname>[0:3]<lastname>[0:3]<:lower>[COUNTER2]"
},
"email": "<:umlauts><firstname>.<lastname>[COUNTER2]@<school>.domain.de",
"record_uid": "<record_uid>"
},
"password_length": 8
}
At first glance, this file looks correct and valid JSON. However, UCS@school performs schema validation on the configuration. In this schema, a section named classes is mandatory — even if you don’t use it.
Root Cause
The error is triggered because the section "classes" is missing from the configuration.
The UCS@school validation schema expects this block to always exist as an object. If it’s missing, it is treated internally as None, leading to the error message:
None is not of type 'object'
Solution
Add the classes section to your configuration file. Even if you don’t need to configure classes, an empty object will satisfy the schema:
{
"csv": {
"mapping": {
"Vorname": "firstname",
"Nachname": "lastname",
"Klassen": "school_classes",
"Schule": "school",
"Merkmal": "record_uid"
}
},
"scheme": {
"username": {
"default": "<school><:umlauts><firstname>[0:3]<lastname>[0:3]<:lower>[COUNTER2]"
},
"email": "<:umlauts><firstname>.<lastname>[COUNTER2]@<school>.domain.de",
"record_uid": "<record_uid>"
},
"classes": {},
"password_length": 8
}
Verification
To confirm the syntax and structure of your JSON file, you can use the tool jq:
apt install jq
jq . /var/lib/ucs-school-import/jobs/2025/102/3_user_import.json
If the file is valid JSON, jq will pretty-print it. If not, it will display an error pointing to the invalid part.