AttributeError: module 'restaurants' has no attribute 'clarifai_tag_suggestions'

  1. Describe the issue briefly
    I am getting this error in views.py where I had to call the get_tags_suggestions() function from clarifai_tag_suggestions.py. But it is present in the restraunts folder.
  2. How much time have you spent debugging this issue?
    (Please spend at least 15 minutes to resolve the issue on your own before posting a new topic here)
    20 mins.
  3. What is your hypothesis?

check how to call function from one to another file using python.

import the filename.function name, that should do it.

Hi @fakerodeo, please try importing the function in views.py file.

I did it, now i want to submit the code again and again go for assessment.
How to do it?

You can try pushing the code again and the assessment will start.

I also needed some help in converting the response we get from clarifai into a python list

Please look more into extracting the data from json format in python.

I am not getting how to access the outputs:[{ data:[{ concepts }] }] as we need to make a list of the tags in concepts

You can refer this

1 Like

Thanks man, that helped. I didn’t knew that the indices also have to be given.

1 Like

When I upload any image from the app, the tags seem to coming for the biryani image.
I have used the url that is passed as argument, where am I going wrong?

@fakerodeo This issue has been closed. If you have doubts on other topic, please create a new thread.