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.
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:
The project notebook/recipe where the module is being called is different from the project where the reusable script was created.
The extension of the reusable python file is not '.py', or if within a subfolder, it may be missing the __init__.py file.
The notebook kernel needs to be restarted to pick up the changes to the project library
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