# When i m creating class in Python , i am getting error

**URL:** <https://discourse.jupyter.org/t/when-i-m-creating-class-in-python-i-am-getting-error/18400>\
**Category:** classic-ui\
**Created:** [March 12, 2023, 7:07am UTC](https://discourse.jupyter.org/t/when-i-m-creating-class-in-python-i-am-getting-error/18400 "2023-03-12T07:07:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DHRITIMAN\_GHOSH](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/dhritiman_ghosh/32/9357_2.png) [@DHRITIMAN\_GHOSH](https://discourse.jupyter.org/u/DHRITIMAN_GHOSH)\
**Post date:** [March 12, 2023, 7:07am UTC](https://discourse.jupyter.org/t/when-i-m-creating-class-in-python-i-am-getting-error/18400/1 "2023-03-12T07:07:44Z")

</div>

class Ghosh:  
Husband = ‘Bubun’  
Wife = ‘Lopa’  
Daughter =‘Aishee’  
theGhosh = Ghosh()  
print(theGhosh.Daughter)

NameError: name ‘Ghosh’ is not defined

---

<div class="post-metadata">

**Author:** ![DHRITIMAN\_GHOSH](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/dhritiman_ghosh/32/9357_2.png) [@DHRITIMAN\_GHOSH](https://discourse.jupyter.org/u/DHRITIMAN_GHOSH)\
**Post date:** [March 12, 2023, 7:10am UTC](https://discourse.jupyter.org/t/when-i-m-creating-class-in-python-i-am-getting-error/18400/2 "2023-03-12T07:10:32Z")

</div>

I need help to sort the issue…i am coding in Jupyter notebook

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [March 12, 2023, 3:48pm UTC](https://discourse.jupyter.org/t/when-i-m-creating-class-in-python-i-am-getting-error/18400/3 "2023-03-12T15:48:16Z")

</div>

This is not pertinent to this forum. Unless there’s something your formatting is hiding (or more accurately, lack-there-of, see below), you’d most likely have the same issue if you were running this as a Python script from the command line with that code as the content or if you pasted that into an IPython interpreter console. Hence, that makes it not a Jupyter issue.

When you find the appropriate location for your post…  
For posting on forums such as this you’ll want to learn how to use code blocks to keep the formatting of the lines. Without the indentation, it is hard for anyone to help you. See [here](https://discourse.stonehearth.net/t/discourse-guide-code-formatting/30587), with special attention to ‘Block code formatting’. That skill will help you in many places. In StackOverflow, they have an icon you can select.
