Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on March 14, 2023 4:54AM
Likes: 0
Replies: 1
Hi,
I have created a function and added with library (within folder of python) but when I try to call the function , I am getting error like "No module named 'myfun'" , When I created same function outside of folder and try to call then getting error like "NameError: name 'fun_name' is not defined
As per my understanding:
(1) create python function
(2) Added into python library
Could you please help with example where I am doing the mistake.
Hi,
The steps to create reusable python code are detailed with some working examples here: https://doc.dataiku.com/dss/latest/python/reusing-code.html
The error message is letting us know it cannot find that module and the root cause could be because of several reasons, some of which are:
I'd recommend going through with the examples in the documentation. If those examples still fail for you, we'll need some details of your instance to further investigate. That conversation will be more effective over a support ticket, which you can create here: https://support.dataiku.com/support/home