crucible.py returns Failed to get a patch. Please make sure to call the script from an SCM directory with local changes, or pipe in some input

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

When a user is trying to create a review using crucible.py as mentioned in Creating reviews from the command line in P4 workspace, it throws an error as

..
..
DEBUG:root:Checking <class '__main__.P4Source'>.is_active
DEBUG:root:Trying to execute (['p4'],)
Failed to get a patch. Please make sure to call the script from an SCM directory with local changes, or pipe in some input.

Cause

Script is trying to execute the p4 executables but not able to pipe the output from subprocess

Workaround

  1. It may be an issue as explained in  CRUC-8206 - Getting issue details... STATUS . If you are running the script in a workspace containing a P4 repo is a symbolic link, try the workaround mentioned in the bug.
  2. Please verify the p4 is in environment variable PATH. We have seen similar issues when the p4 is made available with alias.


Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.