# Calling the constructor outside a module works, but inside a module throws ArgumentError: ref of NULL PyObject

**URL:** <https://discourse.julialang.org/t/calling-the-constructor-outside-a-module-works-but-inside-a-module-throws-argumenterror-ref-of-null-pyobject/42362>\
**Category:** General Usage\
**Tags:** package, pycall\
**Created:** [July 1, 2020, 12:10pm UTC](https://discourse.julialang.org/t/calling-the-constructor-outside-a-module-works-but-inside-a-module-throws-argumenterror-ref-of-null-pyobject/42362 "2020-07-01T12:10:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)\
**Post date:** [July 2, 2020, 11:39am UTC](https://discourse.julialang.org/t/calling-the-constructor-outside-a-module-works-but-inside-a-module-throws-argumenterror-ref-of-null-pyobject/42362/2 "2020-07-02T11:39:27Z")

</div>

@stevengj Do you maybe have a clue?

---

_[View the full topic](https://discourse.julialang.org/t/calling-the-constructor-outside-a-module-works-but-inside-a-module-throws-argumenterror-ref-of-null-pyobject/42362)._
