# Python Module 8 Error: I am not able to import objects from other subpackages

**URL:** <https://forum.codewithmosh.com/t/python-module-8-error-i-am-not-able-to-import-objects-from-other-subpackages/13154>\
**Category:** Python\
**Created:** [June 19, 2022, 4:07am UTC](https://forum.codewithmosh.com/t/python-module-8-error-i-am-not-able-to-import-objects-from-other-subpackages/13154 "2022-06-19T04:07:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Armaan.Tufail](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@Armaan.Tufail](https://forum.codewithmosh.com/u/Armaan.Tufail)\
**Post date:** [June 19, 2022, 4:07am UTC](https://forum.codewithmosh.com/t/python-module-8-error-i-am-not-able-to-import-objects-from-other-subpackages/13154/1 "2022-06-19T04:07:55Z")

</div>

Hi, I’m a beginner to Python. Mosh’s course has helped me immensely, but there is one problem I can’t seem to resolve, in the Modules section of Mosh’s Python course, specifically video #8: Intra-package References.

Lets say I have a main package called **A** , which has two subpackages called **B** and **C**. **B** has a python file called **X.py** and **C** has a python while called **Y.py**. A, B and C all have the empty files **init**.py (which is necessary to make them a package). **Y.py** has an object called **ExampleClass**. I want to be able to import **ExampleClass** in **X.py**. So according to tutorials I should write the following:  
_from A.B.X import ExampleClass_  
_from …B.X import ExampleClass_  
(same for functions but I didn’t write that to avoid repetition)

But both of these aren’t working for me, both on PyCharm and Python IDLE and I get an error saying there is no module named ‘A’. Is this command no longer supported on Python or there is an issue with my device?

---

<div class="post-metadata">

**Author:** ![bournesight](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bournesight](https://forum.codewithmosh.com/u/bournesight)\
**Post date:** [March 15, 2023, 10:07am UTC](https://forum.codewithmosh.com/t/python-module-8-error-i-am-not-able-to-import-objects-from-other-subpackages/13154/2 "2023-03-15T10:07:15Z")

</div>

I am getting the same error. Did you make it work? @Armaan.Tufail

---

<div class="post-metadata">

**Author:** ![Armaan.Tufail](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@Armaan.Tufail](https://forum.codewithmosh.com/u/Armaan.Tufail)\
**Post date:** [March 19, 2023, 5:19pm UTC](https://forum.codewithmosh.com/t/python-module-8-error-i-am-not-able-to-import-objects-from-other-subpackages/13154/3 "2023-03-19T17:19:14Z")

</div>

Unfortunately not. Seems like it’s just not possible.
