Hello, I cannot figure out how to fix this error. Here is a minimal reproducible example nextflow script:
#!/usr/bin/env nextflow
trigger_channel = Channel.value(true)
process TEST {
input:
val dummy_input from trigger_channel
script:
"""
#!/bin/bash
RECEIVED_VALUE="${dummy_input}"
echo "Received: \${RECEIVED_VALUE}!"
"""
}
workflow {
TEST()
}
And this is the error that I get:
**N E X T F L O W** ~ version 25.04.4
Launching `hello.nf` [**tiny_pasteur**] DSL2 - revision: 9f12102eb8
ERROR ~ Cannot read write-only property: from
-- Check script 'hello.nf' at line: 7 or see '.nextflow.log' file for more details
Line 7 is “val dummy_input from trigger_channel.”
Here is the detailed error from .nextflow.log:
Jun-17 15:14:53.385 [main] DEBUG nextflow.Session - Session aborted -- Cause: Cannot read write-only property: from
Jun-17 15:14:53.390 [main] ERROR nextflow.cli.Launcher - @unknown
groovy.lang.GroovyRuntimeException: Cannot read write-only property: from
at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:58)
at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1387)
at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1335)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script_ea2282ef16eedb5b$_runScript_closure1.doCall(Script_ea2282ef16eedb5b:7)
at Script_ea2282ef16eedb5b$_runScript_closure1.doCall(Script_ea2282ef16eedb5b)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:280)