-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better error messages #2082
Comments
I've seen this error several times and now take it to mean that there is a syntax error, somewhere, as in your example i.e. wtf(1, 2 3, 4) should be wtf(1, 2, 3, 4). But finding out where can be difficult and time consuming. I had one case where there was an extra space at the end of the line after a continuation backslash. It would be useful if the error message could direct you to the actual line where the syntax error is and not just to the line at the beginning of a containing block such as 'workflow {'. But maybe that's just difficult to determine? |
Yes, we are aware of this. Unfortunately, solving this problem it's not an easy task, since Nextflow does not have its own syntax parser but instead uses AST manipulation techniques to extend the Groovy syntax into Nextflow DSL. I fear that something related to the new syntax parser introduced by Groovy 3. |
OK. I figured it was a hard problem. For me, it's one of the main things I encounter -- the debugging is difficult. |
Better to keep it open as a reminder of a problem we need to solve. If you could provide a hint of the solution, it could help us in the troubleshooting. |
This comment was marked as resolved.
This comment was marked as resolved.
This one is a real pain when the cause of the syntax error is within a lengthy script embedded in the process. In my case it was an awk regex causing the issue -- the escaping needed different treatment within nextflow. Specifically my regex included a match on
But within a triple-single-quoted nextflow
The fix is to use a double-backslash within the awk script:
(technically this regex also works without the backslash, but that's beside the point :)) |
for such and advanced and powerful dsl, the error messages are very unhelpful for new users. I found that using script templates was the best way to get around this issue. |
I'm having the same problem with poor error reporting. The error is:
Which is seen when running a process with this line:
Removing the
|
I think you will find that all of the following alternatives will work (DSL2)
I think the reason why below does work has something to do with it being interpreted as a name-value pair because of the '
but for
the value part is taken to be Personally, I prefer to put
|
Spot on with the |
I also wanted to point out that the debugging with nextflow is really very non-informative, time consuming and frustrating! |
thank you! |
I spent 1 hour debugging this, because my error was after the line error
Gave the error
My mistake was having a comma at line 11. I wasted a lot of time looking for the error before line 8, but the error was later in the code (so don't just look upstream for the error, look downstream as well.) I agree with others; please improve debugging in nextflow. |
Usually the error is after this point. So the message is useful. |
Nextflow is great!, But, it is sometimes quite difficult to debug nextflow errors due to uninformative error messages. Here is one example:
This gives:
I will add others in comments below as I encounter them.
Solution is to add a comma between args in the wtf call:
The text was updated successfully, but these errors were encountered: