Ultralytics Actions / format (pull_request_target) failing

Greetings,
I have implemented a small modification for the .plot() function that enables me to easily determine the positioning of the class labels around the bounding box. It works nicely and I wanted to share this with the community via a PR( #17019) on Ultralytics GitHub. Everything seems to check out except “Ultralytics Actions / format (pull_request_target)” and when i go look at the details, this is the only line I see that is related to the issue:
[555] shell: /bin/bash --noprofile --norc -e -o pipefail {0}

[556]/Users/runner/work/_temp/e8eb15f5-8c28-4bd1-b1f3-95ea14e03f2c.sh: line 3: syntax error near unexpected token `(’

[557]Error: Process completed with exit code 2.

The shell script given in the error message seems to be a temporarily generated one which I cannot find or access anywhere so I am essentially at a dead end.
This was my very first PR anywhere and I am very new with GitHub in general and it is not like I invented the wheel so I don’t mind if I can’t get to spread this but I have seen people asking about customizing label positioning so I was curious how I could share my easy fix with everyone. Any hint, advice, reference would be kindly appreciated.
Cheers.

Hello!

It’s fantastic to hear that you’re contributing to the Ultralytics community with your modification! :tada:

The error you’re encountering seems to be related to a syntax issue in the shell script used by GitHub Actions. This can sometimes happen due to unexpected characters or formatting in the script. Here are a few steps you can take to troubleshoot:

  1. Check Your Code: Ensure there are no syntax errors or unexpected characters in your code, especially around any shell commands you might have added.

  2. Re-run the Workflow: Sometimes, simply re-running the workflow can resolve transient issues.

  3. Update Your Branch: Make sure your branch is up-to-date with the latest changes from the main branch. This can sometimes resolve conflicts or issues with the CI/CD pipeline.

  4. Review the Logs: Look for any additional context in the logs that might point to the specific line causing the issue.

For more detailed guidance, you can refer to the GitHub Actions documentation.

If the issue persists, feel free to share more details here, and the community can help further. Your contribution is valuable, and it’s great to see your enthusiasm for sharing improvements! :blush:

I suspect your branch name u-uzun:plot()_modification could be causing an issue since it includes ( and ) characters. It’s likely these characters need to be escaped, but it’s generally not common practice to include such characters on GitHub branches and you can verify your branch name is compliant directly with git (although I’m guessing yours would pass as-is).

I think your best bet could be to close your PR and create a new branch. Use a new name without any special characters, maybe something like modify-plot-method, and merge your changes from the existing branch into the new branch and open a new pull-request.

1 Like

Hello Burhan,
Looks like that was indeed the problem.
Your fix solved the issue.
Thank you for your attention to detail and help.

1 Like