Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why did jira-python stop initializing?

Zachary Buser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2025

I have been using the Jira python library successfully for a few weeks and all of a sudden it will not initialize. It stops at the very first line of the file, where Jira is imported.

Here's the error message (with directories removed) from PyCharm:

Traceback (most recent call last):
File "jira_probe.py", line 1, in <module>
from jira.client import JIRA
File ".venv\Lib\site-packages\jira\__init__.py", line 11, in <module>
from jira.client import (
File ".venv\Lib\site-packages\jira\client.py", line 43, in <module>
import requests
File ".venv\Lib\site-packages\requests\__init__.py", line 43, in <module>
import urllib3
File ".venv\Lib\site-packages\urllib3\__init__.py", line 14, in <module>
from . import exceptions
File ".venv\Lib\site-packages\urllib3\exceptions.py", line 6, in <module>
from email.errors import MessageDefect
ModuleNotFoundError: No module named 'email.errors'; 'email' is not a package

I installed the jira library with pip per the API reference instructions, and it was working fine for a while, so I suspect something is broken in jira-python. I already tried deleting all the packages from my interpreter and reinstalling them. The two things that stand out to me are "import ( " in line 5 of the above error and "from . import exceptions" in line 11. I greatly appreciate any help with this.

1 answer

1 accepted

6 votes
Answer accepted
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2025

@Zachary Buser 

By any chance have you created a file named email.py or a module named email?

if yes, it would be clashing with the required package.

Can you check and confirm?

Zachary Buser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2025

Yes, that was it, thank you! I have never heard of this kind of problem before. It works now.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events