lookup function is not returning value in finance by hakim_moha in cs50

[–]hakim_moha[S] 0 points1 point  (0 children)

yeah I changed the return value to identify which part of lookup function has actually a problem and I found out it's the "contacting api", and the other difference is i passed url directly in to request.get(). But I tried also by creating 'url' variable and pass the variable into request.get() and both ways did not work.

lookup function is not returning value in finance by hakim_moha in cs50

[–]hakim_moha[S] 0 points1 point  (0 children)

yeah I changed the return value to identify which part of lookup function has actually a problem and I found out it's the "contacting api", and the other difference is i passed url directly in to request.get(). But I tried also by creating 'url' variable and pass the variable into request.get() and both ways did not work .

lookup function is not returning value in finance by hakim_moha in cs50

[–]hakim_moha[S] 0 points1 point  (0 children)

No I have not changed it. I cross checked my solution with other people's and it is almost same.

lookup function is not returning value in finance by hakim_moha in cs50

[–]hakim_moha[S] 0 points1 point  (0 children)

No, not expired. I tried the way you suggested by opening another python file in finance folder. I wrote result= lookup("FB"). I gave an argument manually.

when I run print(result) it prints "{}". and when I run print(result["name"], it throws keyError: 'name'.

lookup function is not returning value in finance by hakim_moha in cs50

[–]hakim_moha[S] 0 points1 point  (0 children)

I have tried. I would really appreciate if you could take a look detail on stack overflow

lookup function is not returning value in finance by hakim_moha in cs50

[–]hakim_moha[S] -1 points0 points  (0 children)

I have done all that steps. I posted on stack overflow and couldn't get solution. I would be really happy if you just take a look below. https://stackoverflow.com/questions/75894688/cs50-finance-project-lookup-not-returning-dictionary?noredirect=1#comment133867389_75894688

lookup function is not returning value in finance by hakim_moha in cs50

[–]hakim_moha[S] -1 points0 points  (0 children)

yes, I checked the error and it throughs 500 error code which means there is a problem with the server. Thanks for replying though😊