Mostly about the module 2 doubts
In module 2, I submitted the project accordingly and it was correct as I tested
but when I submit it it shows an error like:
āThere was a problem compiling the code from your notebook, please check that you saved before submitting. Details:
No module named āopenaiāā
please help me with this
Iām not a mentor for that course, and I have not seen the course materials. So my reply is just general guidance about similar errors.
When you added your code to the notebook, did you perhaps add an āimport openaiā statement to one of the cells?
@Hirak15 It looks like your submission requires the OpenAI module, but it isnāt installed or accessible during the compilation process.
- Ensure it is installed pip install openai
- After installation import it using import openai
Thanks
Is that really a good idea? Because usually a course will already be set up to include all of the required assets. It would be very unusual to have to install an asset in order to pass the grader.
Or maybe this course is set up differently than I am familiar with.
@TMosh You are correct that usually all the course when we launched the notebook do it automatically. And also we have to run the cell already having those import function.
It is just for the understanding that when this error is occurring (sometime even due to internet issue it is unable to find the module files).
@Hirak15 can you specify that at what point you are getting this error exactly in module 2.
Hi @Hirak15,
When you submit your assignment for grading and it gives you an error like this, No module named āopenaiāā
, this means you are using a library in your notebook which is not part of the grading environment, hence you should remove this import from your notebook and submit it again.
Best,
Mubsi
This error is occuring in every exercise
Ok I will try
@Hirak15 tell us the exact error you are getting in which exercise. Then only we can guide you.
I believe it was posted yesterday (and the thread title cites āModule 2ā of the āAI Python for Beginnersā course.
@TMosh Yes, as mentioned, this issue occurs mostly, even though this post was marked as a Solution. Again, it was stated that this error is happening in every exercise. I have checked the course myself and did not find any such error related to āNo module named openaiā."