smilelife
smilelife

Reputation: 195

jira-python invalid syntax

First time using jira-python, and I get this error when I run just a simple initialization.

from jira.client import JIRA

jira = JIRA()

Error:

File "C:\Python32\lib\site-packages\jira\resources.py", line 146   
if re.search(u"^User '(.*)' was not found in the system\.", error, re.U):   
SyntaxError: invalid syntax

Any ideas? I am running this with py32

Upvotes: 2

Views: 977

Answers (2)

JulianBPL
JulianBPL

Reputation: 193

I guess you already installed Jira in your CMD, like:

$ pip install jira

Then just try something like the following:

from jira import JIRA

jira = JIRA('https://jira.atlassian.com') #Project URL

issue = jira.issue('KEY-1')
print issue.fields.project.key            # 'KEY'
print issue.fields.summary                # 'Issue Summary'

Upvotes: 0

alecxe
alecxe

Reputation: 473893

It looks very much like a bug.

They are claiming python 3 support, but there are u strings in the source code. Python 3 doesn't support u strings, all of the strings are unicode.

Consider submitting an issue to the python-jira bug tracker.

Upvotes: 1

Related Questions