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

1 Like

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:

1 Like

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!

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.

1 Like

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"

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