Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Problems

The Problems page lists every problem labcatalog check finds: mismatches between the metadata and the data, and mistakes in the metadata itself. The count on the Problems tab is red when any problem is an error.

The Problems page listing the example's problems

At the top are the number of errors and warnings and the same search and filter bar as on the Datasets page: the search box finds a problem by its message, file, code or dataset, and the buttons narrow it by Level, by the Study, Wave, Reporter and Modality of the dataset it is about, and by Code. A problem in a file of the whole project, such as an instrument or labcatalog.yaml, stays whatever study, wave, reporter or modality is chosen. The study chosen in the picker at the top right sets Study when you choose it.

The table

The table shows each problem’s level, the file and line it is in, the problem and its code. A project file (labcatalog.yaml, an instrument, draft or study file, or a column map) opens in the editor in the Codebook step of the Set up page at that line. A data file opens in its own application.

The Fix panel

Fix at the end of each row opens a panel about that one problem. It says what the problem means in plain words and who usually fixes it: you, whoever knows what a value should be, or the person who looks after the cleaning scripts.

For a problem in the data, the panel lists The rows it is about: the row of the data file (counting from the first line below the header), the ID and, where one column is at fault, its value. IDs with a space before or after them are shown in quotes so the space can be seen. Up to 50 rows are listed.

Where the fix is a change to the project files, the panel makes it for you:

ProblemWhat the panel offers
not_in_vocabA list of the allowed words with the closest one chosen, and Use this word. When the same slip is in several entries, Use it in all N places fixes them together. Add ‘...’ as a new word adds it to vocab instead.
unknown_referenceWhere one value holds the wrong ID (a study, an instrument or a dataset of an administration, an override’s item, a response set), a list of the IDs it could be with the closest chosen, and Use this ID.
reference_missingA list of the keys in references.bib with the closest chosen, and Use this ID.
column_missingThe data columns the map does not list yet, with the closest to the missing name chosen, and Use this column; or Take the row out when the data file does not hold that column. For a dataset’s date_column, a note to name the date column the data file has.
duplicate_idFor a column map that lists one column twice, or maps one item to two columns: both lines, each with Take this row out. For two datasets, items, scores, response sets or prepare steps with one ID: each of them with a box and Rename; whatever else names the one renamed, such as a score or a column map, needs the new ID too. For an answer value or a facet listed twice: each with Take this one out. Two files with one ID and reference keys used twice only open the file.
missing_code_collision... is an answer, which takes the value out of the missing codes: in this dataset only (it gets its own missing_codes) or in every dataset. If the value really means no answer, the response set is wrong; open the instrument file.
column_unmappedEach column the map does not list, to add to the map as not an item or as an item of an instrument given in that dataset.
unmapped_itemEach item without a column, with the data columns the map does not list yet (the likely one chosen), or not asked in the dataset, which records the item as dropped there.
unexpected_valueEach value, marked as a typo, a missing code (in this dataset only or in every dataset, which adds it to the project’s list and to each dataset’s own missing_codes) or a new answer option. A new option changes the instrument, so it counts in every dataset. A typo stays in the data: labcatalog never changes data files.
prepare_outdated, prepare_output_missingRun ... again, which runs that prepare step and shows its log if it stops with an error.

A change is checked before it is saved, the same way loading the project checks the files. If the change would leave a new error, the panel says what labcatalog would report and saves nothing. Sometimes that error was already there and the first one hid it: a misspelled instrument in an administration stops labcatalog from checking that administration’s datasets, so a misspelled dataset next to it only shows once the instrument is right. Then Save anyway saves the change, and the hidden problem appears in the table to fix next.

Every panel also has Open for the file the problem is in and Copy a note, which copies the problem, its file and its rows as text to send to whoever fixes it. A problem in a file that a registered prepare step writes with an R or Python script from a CSV, TSV or text file (not a folder or a database) also has Draft a fix to the script, which asks the language model for a change to that script and shows it before saving; see Register Prepare Steps.

Warnings that are fine

Some warnings need a look but no change: people who gave the same answer to every item may have answered that way. For a warning, the panel has a Why it is fine box and It is fine. The warning then leaves the table, and a section at the bottom of the page lists the warnings accepted so far, with who accepted each, when and why, and Show again to bring one back.

The record is kept in accepted_warnings.yaml in the project folder, so it travels with the project and its history. A warning comes back by itself when its message changes, for example when more people give the same answer. Errors cannot be accepted. Problem Codes describes the file.

Fix the files, then press Refresh. Fix Reported Problems explains the common problems, and Problem Codes lists all of them.