Reputation: 135
Hi I'm running a python script that transitions tickets from "pending build" to "in test" in Jira. I've ran it on my local machine (Mac OS X) and it works perfectly but when I try to include it as a build task in my bamboo deployment, I get the error
"from jira import JIRA
ImportError: No module named jira"
I'm calling the python file from a script task like the following "python myFile.py" and then I supply the location to the myFile.py in the working subdirectory field. I don't think that is a problem because the error shows that it is finding my script fine. I've checked multiple times and the jira package is in site-packages and is in the path. I installed using pip and am running python 2.7.8. The OS is SuSE on our server
Upvotes: 1
Views: 11482
Reputation: 1
Confirm that you don't have another file or directory that shares the same name as the module you are trying to import.
Upvotes: 0
Reputation: 3214
That is very hard to understand what you problem is. From what I understood you are saying that when you run your module as standalone file, everything works, but when you imoprt it you get an error. Here are some steps towards solving the problem.
__init__.py
file in the same directory where the package is located.if __name__ == "__main__"
)print os.environ['PYTHONPATH'].split(os.pathsep)
Upvotes: 1