Module 3 Programming Assignment- Analyzing Movie Data with SQL

I have entered in the correct code, or at least the code that is giving me the correct result. However, I am getting 0/15 on all of them.

This is the error message I am getting: “There was a problem compiling the code from your notebook, please check that you saved before submitting. Details: name ‘plt’ is not defined.”

Does this sound familiar to anyone or how to fix it? Thank you!

Hi. From the error message, it’s likely that a graded cell was rearranged or deleted. plt should have already been defined in the import statements up top. Please get a new copy of the lab and follow the submission guidelines in this post. Hope this helps.

1 Like

I’m now getting a new error message.

Details: Query must be a string unless using sqlalchemy.

I also noticed on Ex.1 it tells me to “To connect to the database, you can use the sqlite3.conect() function, which receives the path to the database as an argument”

However, connect is misspelled. Could that be throwing the error? I used “connect()” in the code, but then it doesn’t match the extra hint! help!

Hello @Stakesishigh,

That’s a misspelling, and if you had used that, you would have seen a different error, so that is not it.

Could you share the full error traceback instead of just that line, because that may give us more idea of what’s going on?

Also, were you running the notebook on Coursera? Somebody related this error with library versions, but those on Coursera have been tested to work fine, so I want to rule out this possibility.

Cheers,
Raymond

Hi Raymond,

Thanks ofr the quick reply - this is what I get underneath the grading area. I did saving plt.savefig(“whateverisave.png”) however, this only let me save where there was a plot to save.

“There was a problem compiling the code from your notebook, please check that you saved before submitting. Details: Query must be a string unless using sqlalchemy.” I get this under all the exercises grade point scores.

What’s frustrating is that I am getting everything correct according to the Expected Output, but it’s still incorrect.

The tests for “expected output” are just some simple tests - not a complete verification of your code.

Passing those tests does not mean your code is perfect.

The grader uses totally different tests, and a different workspace.

I apologize - I don’t follow - what are the other tests it could use and which other workspace than the Jupityr notebook that the Assignment launches in? I have renamed it, deleted the files, tried to update the lab, and still end up with the renamed file. Is that a different workspace? Im so lost here and I have been trying to finish this.

Typically the grader parses your notebook, extracts the graded functions, and then runs them from a different notebook using a separate execution environment with different tests.

Learners (and the mentors) have no visibility into the details of the tests the grader uses.

Pretty bummed. I’ve decided to cancel this membership. I have 3 of the classes done of this certificate. I am almost done this class, but I cannot get through this assignment. There is absolutely no way for me to get any help. I hate that I had to give up.

Hi I’m sorry to hear that. Next time, if you think the thread reached a dead end, you can create a new topic and put as much detail as you can about the problem (including screenshots might be helpful, also put a link to the previous thread for context). That will catch the attention of other mentors and staff so they can assist. Just make sure not to post any graded code. I’d be happy to help in case you decide to pick this up again.