I've run into this issue while using the jira library for python. Despite setting the appropriate parameters for basic auth, I get the following:
Exception ignored in: <bound method Magic.del of <magic.Magic object at 0x7f2a4e5ff128>> Traceback (most recent call last): File "/home/keckj/.local/lib/python3.6/site-packages/magic.py", line 129, in del if self.cookie and magic_close: AttributeError: 'Magic' object has no attribute 'cookie'
Here's a quick snippet:
from jira import JIRA
user = '[email protected]'
apikey = 'xxxxxxxxxxxxxxxxxxxxx'
jira_server = 'https://xxxxxxxxxx.jira.com'
options = {'server': jira_server}
jira = JIRA(options, basic_auth=(user,apikey))
issue = jira.issue("KEY-123")
issue_summary = issue.fields.summary
issue_description = issue.fields.description
print('JIRA ISSUE SUMMARY: %s' %str(issue_summary))
print('JIRA ISSUE DESCRIPTION: %s' %str(issue_description))
I've dug in a few directions via Google but been coming up short:
I found the answer buried at bottom of https://github.com/ahupp/python-magic/pull/222:
Apparently python-jira expects the filemagic python package, which takes a flags parameter, but for some reason our environment had your python-magic package, which expects different parameters.
Direct link: https://github.com/ahupp/python-magic/pull/222#issuecomment-675354824
To resolve this, I ran pip install filemagic
and voila, no further exceptions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With