Expand my Community achievements bar.

Recipe Builder - df0 not defined


Level 2

Hi again, 


Within recipe builder - under training data loader file section - I realised my dataset is not loading to df0....here is the snippet of the code.  Could you help, please?


client_context = get_client_context(config_properties)


dataset_reader = DatasetReader(client_context,config_properties['trainingDataSetId']


tenant_id = config_properties.get("_tenantid")


df0 =dataset_reader.load()



When I try to train this - I get an error of "df0 is not defined". 

3 Replies


Level 2

I think I found a problem with the library from ".utils import get_client_context" 


I keep getting an error of "attempted relative import with no known parent package".

I deleted the dot in front of utils and get an error of "no module called utils".

So I go to console and pip install utils but then I get an error of "cannot import name 'get_client_context'. 


Could someone help with this package (.utils import get_client_context) ?  I think this is why my df0 is not defined. 


Level 5

@DetectivePikachu If utils is a custom module, ensure it's in the same directory as your script or placed somewhere Python can find it. Python looks for modules to import in the directories listed in its PYTHONPATH environment variable. You can check your PYTHONPATH by running the below Python.

import sys; 


Level 2

@adobechat  Thanks for your response again, 


This module was used for the code provided in the Adobe documentation https://experienceleague.adobe.com/docs/experience-platform/data-science-workspace/authoring/python....).


from .utils import get_client_context


But I cant find the libary (.utils) in python (PyPI and PYTHONPATH) or the conda list..... I just ran a console to conda install .utils  and I get a packagesnotfounderror.   Can you help me find this libary (.utils), please?