nextflow-io / nextflow-io/nf-schema
Cryptic error message when input schema file is missing
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 57
- Forks
- 31
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 1
Description
(first reported in the nf-core Slack)
When creating a pipeline schema with nf-core pipelines schema build, the schema builder assumes that you will also create a schema for your input csv.
Partial contents of nextflow_schema.json:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
...
"$defs": {
"input_output_options": {
"title": "Input/output options",
...
"properties": {
"input": {
"type": "string",
"format": "file-path",
"exists": true,
"schema": "assets/schema_input.json",
"mimetype": "text/csv",
If you do not then manually create assets/schema_input.json based on the input manifest, when you try to use validateParameters() in the workflow, nextflow will throw a cryptic error message:
ERROR ~ Unable to determine the current character, it is not a string, number, array, or object
The current character read is '' with an int value of 0
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 255
The nextflow schema passes linting (nf-core pipelines schema lint) without errors, even though the input schema does not exist.
The error is fixed by deleting the line "schema": "assets/schema_input.json", from nextflow_schema.json, or by creating a valid input schema.
Versions
- nextflow: 24.10.3
- nf-core: 3.2.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing validateParameters() for a schema reference to missing assets/schema_input.json, then compare its behavior with nf-core pipelines schema lint. Reproduce the failure using the nextflow_schema.json example and the listed Nextflow and nf-core versions. Done means the missing input schema produces a clear diagnostic, with regression coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100