Last active
June 19, 2017 15:17
-
-
Save LukeGoodsell/8b2ecb42658fd8be3b3ad77e13866a9a to your computer and use it in GitHub Desktop.
Nextflow output value & Snakeyaml failure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jun-19 16:03:13.939 [Actor Thread 4] WARN nextflow.processor.TaskContext - Cannot serialize context map. Cause: java.lang.IllegalArgumentException: type cannot be null. -- Resume will not work on this process | |
Jun-19 16:03:13.942 [Actor Thread 4] DEBUG nextflow.processor.TaskContext - Failed to serialize delegate map items: [ | |
'x':[null] = [firstName:Jane, lastName:Doe] | |
'$':[java.lang.Boolean] = true | |
'task':[nextflow.processor.TaskConfig] = [process:foo, index:2, echo:false, validExitStatus:[0], maxRetries:1, maxErrors:3, shell:[/bin/bash, -ue], executor:local, name:foo (2), cacheable:true, errorStrategy:TERMINATE, workDir:/Volumes/LG_01_WD3TB/tmp/preqctest/work/85/8e1bdbe341d5644034fd3e24426884, hash:858e1bdbe341d5644034fd3e24426884] | |
'paramsFilePath':[java.io.File] = /Volumes/LG_01_WD3TB/tmp/preqctest/work/85/8e1bdbe341d5644034fd3e24426884/params.yaml | |
'yaml':[org.yaml.snakeyaml.Yaml] = Yaml:94182769 | |
] | |
com.esotericsoftware.kryo.KryoException: java.lang.IllegalArgumentException: type cannot be null. | |
Serialization trace: | |
multiRepresenters (org.yaml.snakeyaml.representer.Representer) | |
representer (org.yaml.snakeyaml.Yaml) | |
at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:82) | |
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:495) | |
at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:523) | |
at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:61) | |
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:495) | |
at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:599) | |
at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:95) | |
at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:21) | |
at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:599) | |
at com.esotericsoftware.kryo.Kryo$writeClassAndObject$1.call(Unknown Source) | |
at nextflow.util.KryoHelper.serialize(SerializationHelper.groovy:166) | |
at nextflow.util.KryoHelper$serialize.call(Unknown Source) | |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) | |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) | |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) | |
at nextflow.processor.TaskContext.serialize(TaskContext.groovy:181) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nextflow | |
import org.yaml.snakeyaml.Yaml | |
objects = [ | |
[ firstName:'John', lastName:'Doe' ], | |
[ firstName:'Jane', lastName:'Doe' ] | |
] | |
process foo { | |
input: | |
val x from objects | |
output: | |
val x into receiver | |
exec: | |
println("foo: '${x.firstName}'") | |
paramsObj = [:] | |
paramsObj['name'] = x.firstName + " " + x.lastName | |
paramsFilePath = new File("${task.workDir}/params.yaml") | |
yaml = new Yaml() | |
yaml.dump(paramsObj, new FileWriter(paramsFilePath)) | |
} | |
receiver.println { "Received: ${it.firstName}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment