Set env variable from script and set next request | AssertionError: expected [] to have a length above 0 but got 0

Heyy all, I am really stuck at this point. After completing all tasks, when I am sending a request for testing my collection, then it shows -

Set env variable from script and set next request | AssertionError: expected [] to have a length above 0 but got 0

I’ve updated the collection link, saved each request after every change I made but the same error.
Please help me out

2 Likes

Hi, are you using the student expert collection? You’re going to want to go back over the second folder on scripting and collection runs. :slightly_smiling_face:

2 Likes

Yes, I am using the student expert collection. I have done all the tasks that were in scripting and collection runs. :sob:

Hey, I’ve checked all the steps of the folder Scripting and Collection runs, but again same error.

Make sure you have saved all of your requests and updated the link through the share button!

1 Like

Yes ma’am done that, at first I thought it was because of outdated postman tool but then I performed it on updated version and later performed it on postman for web too. That test is failing every time.

Can you share your collection link here?

Yeah sure,
https://www.getpostman.com/collections/2874b74e1657fabfb2ea

This is my collection link

OK so you’ve missed a step in the second folder, if you open the second request Get specific player and uncheck the parameter so that you see the first set of instructions that should walk you through–you need to add a script to the Get all players request that sets an environment variable.

2 Likes

Heyy thankyou so much :grinning: finally it worked.

1 Like

Can you help me on this? I am facing the same issue "
Set env variable from script and set next request | AssertionError: expected to have a length above 0 but got 0"

1 Like

I am actually not getting that, can I connect with you?
here is my LinkedIn profile: https://www.linkedin.com/in/md-shahriyar-al-mustakim-mitul-9084b31a0/

1 Like

I connected with you , hope you resolved it yourself

Hi Mam,

I am getting “Used variables | AssertionError: expected to have a length above 0 but got 0”
error.
Could you please check attached screenshot and help me?

Thanks in Advance

same issue with me will you help me please

Hey I’m getting an error to set a env variable from script and set next request
How to solve this


I am also getting the same error please help me if you can

Hi, I have same issue even I deselect the param id from get specific player request

Thank you in advanced!

The best advice that anyone can give people who are having issues, is to start it all again and ensure that you read and follow all the information in the documentation and in the response body/visualizer.

Doing that one step, will help with ~99% of the problems everyone faces.

This Student Expert Collection hasn’t been designed to catch people out or push them to the limits, it’s a basic set of instructions which guides you through a few of the Postman features.

People telling others how to solve the problems, defeats all the individual learning objectives and opportunities, that you get from this particular course. :heart: