Two separate community-maintained Python libraries exist for Jira: 'jira' (pip install jira, v3.10.5) and 'atlassian-python-api' (pip install atlassian-python-api, v4.0.7). Neither is an official Atlassian SDK. They have different APIs, auth patterns, and JQL methods. Agents frequently mix them up.
pip install jiraVerified import paths — ran on the pinned version, not inferred.
Both packages side-by-side. Pick one and stay consistent.
Pick one. 'jira' is better for pure Jira work. 'atlassian-python-api' covers Confluence/Bitbucket/ServiceDesk too.
Generate token at id.atlassian.com/manage-profile/security/api-tokens. Pass as password= (jira pkg) or password= (atlassian pkg).
Always pass cloud=True when connecting to *.atlassian.net
Replace jira.jql(...) with jira.enhanced_jql(...) for Cloud instances.
Server/DC: Jira(url=..., token=pat_token). Cloud: Jira(url=..., username=email, password=api_token, cloud=True)
Pass maxResults=False or paginate with startAt parameter to retrieve all results.
For production use, pin versions. Both packages have had breaking changes between minor versions.
For Jira Cloud, use your Atlassian email address as the username and a generated API token as the password. Ensure the API token has the necessary permissions. Example for 'jira' library: `jira = JIRA(server='https://your-domain.atlassian.net', basic_auth=('your_email@example.com', 'YOUR_API_TOKEN'))`. Example for 'atlassian-python-api' library: `jira = Atlassian(url='https://your-domain.atlassian.net', username='your_email@example.com', password='YOUR_API_TOKEN')`Install the required library using pip. If using the 'jira' library: `pip install jira`. If using 'atlassian-python-api': `pip install atlassian-python-api`. Ensure you install it in the correct virtual environment if one is being used.
Verify that the object you are calling `.fields` on is indeed a `jira.resources.Issue` instance. For attributes that might be `None`, add explicit checks: `if issue.fields.assignee: print(issue.fields.assignee.displayName)`. For fields that require explicit loading (like 'worklog'), use the `expand` parameter when fetching the issue: `issue = jira.issue('ISSUE-KEY', expand='changelog,worklog')`.Examine the `text` portion of the error message for specific details on what is incorrect. Adjust your payload to include all mandatory fields with correct data types and formats as per your Jira instance's configuration (e.g., provide values for all required custom fields for the issue type being created).
Upgrade the 'jira' Python library to the latest version using `pip install --upgrade jira`. If the problem persists after upgrading, review your code to ensure it's not explicitly targeting API v2 endpoints and is compatible with the API v3 changes, particularly for search queries.
No dependency data recorded yet.