$Unwind Lab Incorrect answer. Is that a matching error or am I wrong?

Hey there everyone. First of all thanks for this challenging yet helpful courses.

I had an error message on my answer on $unwind lab challenge.

< deleted >

I found this answer on my aggregation.

1st - I matched for English and checked if cast array is exists.
2nd - Using $project I got my title,cast and imbd.rating fields.
3rd - Using $unwind I seperated cast array field.
4th - Using $group stage, I set my id to name, get the $sum of every movie count and got the avarage for imdb.rating.
5th - For the last stage I sorted numFilms in descending order and got the following answer above at the top of the list.

Is there anything I’ve done wrong in my pipeline. Thanks in advance!

I’m adding this screenshot ( hidden answer didn’t show up in here) for a proof of application. You can delete this if it’s against the rules or after you guys solve this issue.

< deleted >

@Burak_84129

Well, first of all, let’s consider what you’re asked to provide:

What is the name, number of movies, and average rating (truncated to one decimal)

So two points to what you have here. First of all, it’s ‘average’ not ‘avarege’; and second your answer needs to be truncated to one decimal. So you’ve got a bit more work to do. Good luck.

Also, I have edited your posts to remove the details; please follow Forum guidelines and do not posts answers, or potential answers, etc. to the Forum. Thanks.

2 Likes

Thanks for your answer David. On my last attempt I truncated to 1 and spelled average right. But after every " sign there should be 1 character of blank space before : sign.

I also reported issue since my answer in screenshot was %100 same with the hidden answer except those blank spaces. Thanks in advance :slight_smile:

@Burak_84129

That was exactly the correct thing to do. Unfortunately, the checking scripts are quite “picky” – we can hope that the development team will be able to make them a bit more accepting of white space.

1 Like

Thank you again David!

Last question about this topic. Am I going to get another chance for submission or we will just let it be like that for this lab. It is not a huge deal for me but that red marker blinds my eyes sometimes :slight_smile:

@Burak_84129

I understand how you feel – it’s a programmer thing :grin: – but I’m afraid there isn’t any way to go back and do it again. Sorry. Good luck going forward.

Hi.

I’m having an issue on that lab too. To check if my aggregate sentence was OK I ran it in the console and also did the pipeline in Compass, stage by stage and my results match in both cases… There’s a special format I have to apply on the sentence I’m pasting on the answer text box? I have only one chance left :frowning:

Thanks in advance!

@Juan_Vicente_65607

The format has to be exactly as shown in the Lab setup

{ “_id”: “First Last”, “numFilms”: 1, “average”: 1.1 }

Notice that the '_id" field is “First Last” and the ‘average’ is exactly 1 decimal.

I would also strongly suggest that you do not tack a new question onto a post that is more than a month old and that has been resolved. You’re just lucky that I happened to see this one.

HI and thanks for the answer, I just searched for an answewr on the same topic and didn’t realize the date of the last comment…

Now, what I can see different is that there’s an extra space in the result of the query:

{ “_id” : “Xxxx Xxxxx”, “numFilms” : xxx, “average” : x.x }

But that’s the way the system returns it in the console… What should I do then?

@Juan_Vicente_65607

I just tested this both with and without spaces, and both parse correctly and, if the values are correct, show as the correct answer. So I’m guessing here that perhaps your answer is not correct? So far as I can tell, the spacing mostly doesn’t affect the issue.

Well, I put the sentence again (previously executed in the console and the aggregation on Compass) and still incorrect… But then the result was exactly the same! Character per character! Anyhow, already the quiz is failed. I think you should take a look on it.

Thanks for the answer!

i have had the same experience. this was quite confusing. Not only did we fail the quiz, but we most likely wasted hours trying to debug a correct answer !!!
you guys get a FAIL on this one…

@Clint_Lewis

If you feel there is an error in the script, I would strongly urge you to post that using the “Report an issue” tab at the bottom of the display. Those comments go directly to the curriculum team, who can make any changes. As I said earlier, so far as I can tell, the validation works correctly.