Questions tagged [lookup]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
209 views

CS50 Finance lookup function always returns NONE

After a week or so of idle i returned to finance and tried to chek my buy function. I bought some stocks of apple(AAPL) but got invalid symbol error, when i tried to use quote(this function always ...
0
votes
1answer
44 views

Why is all my check50 server2 red?

Below are my parse() and lookup() functions for server.c pset6. I have gone over and over but maybe I didn't understand what lookup does. Any help is highly welcome and appreciated. My check50 for ...
0
votes
1answer
99 views

Finance PROBLEM with lookup: TypeError: quote_from_bytes() expected bytes

I have Finance barely ready but like most codes, it has a buggy near the finish line. I have a problem with lookup. Always return None. I check it. and Terminal shows this error: TypeError: ...
0
votes
1answer
408 views

Not able to get values from lookup function

i am trying to show user his current portfolio but from the output it seems that i am not able to access pre-built lookup function.also i am directed to portfolio page without asking for login or ...
1
vote
1answer
875 views

AlphaVantage API Error “Please consider optimizing your API call frequency”

On C$50 Finance, when I refresh my web server too many times, AlphaVantage stops returning stock quotes. As a result, Flask returns "TypeError: 'NoneType' object is not subscriptable" when my code ...
0
votes
1answer
90 views

Finance index function does not return lookup value in index.html

I'm trying to render my lookup values inside of my index function implementation, but I cannot get these values to render in my index.html page. I added share = lookup(record['share_symbol']) to grab ...
0
votes
0answers
41 views

Pset7 buy route error due to API use by lookup function

I am experiencing an error each time I call the lookup function within the buy route when the request method equals post. However, calling lookup during quote does not result in the same error. I ...
0
votes
1answer
76 views

Scramble.c lookup function found flag

So I've got the binary search function working for this problem, but I have no idea how to deal with the "found" flag portion of the problem. I think the idea is to add a "true" condition to the bool ...
0
votes
1answer
235 views

scramble lookup function

I'm having a lot of difficulties with this problem since there are lots of concepts that I don't know. I'm trying to treat dictionary as an array of strings as below: bool lookup(string s) { int min =...
0
votes
1answer
246 views

LOOKUP IS GLITCHY??? PSET7

Lookup sometimes returns None for actual stocks (the ones I have tried are NFLX, GOOG, and FB). Sometimes lookup works successfully and my code correctly executes updating the database. However, ...
0
votes
1answer
337 views

PSET7 Finance Question Quote Lookup Page

I can't seem to get the lookup to work right. I just keep getting an error of "404 Not Found". Here is the URL and it does load but doesn't load when I post to it for some reason http://ide50-...
2
votes
3answers
818 views

Problem with query quotes from Yahoo finance

Does anyone recently have problem with this url "http://download.finance.yahoo.com/d/quotes.csv?f=snl1&s={}" in helpers.py of pset7? Before yesterday, the lookup() in helpers.py worked fine but ...
0
votes
1answer
37 views

PSET6 Lookup - Read-Only Variable As Well As How to Approach

I have started implementing lookup. When I try to compile my code, the terminal gives an error when I try to assign one of my variables to another variable. The error says that I am trying to assign a ...
0
votes
1answer
98 views

pset6 2 errors with parse and lookup [duplicate]

i been stuck with these 2 errors for days which i don't really know what causes them..tried debugging parse and as far as i can tell abs_path is working as it should(although i'm not sure it's written ...
0
votes
0answers
198 views

pset7 - buy() , problem accesing the dictionary that was returned when calling the lookup function

I'd been struggled with this. Here's my code: @app.route("/buy", methods=["GET", "POST"]) @login_required def buy(): if request.method == "GET": return render_template('buy.html') ...
0
votes
1answer
151 views

check50 is returning errors on pset6 but if I search the pages on browser all of the pages work [duplicate]

I am running check50 and get these errors: :) server.c exists :) server compiles :( Requesting cat.jpg returns 200, image/jpeg, and correct image :( Requesting cat.html returns 200, text/html, and ...
0
votes
1answer
77 views

Pset6 - Help with Lookup Function

const char* lookup(const char* path) { const char* MIME = NULL; const char* first = strchr(path, '.')+2; const char* last = strrchr(first, ' '); //(need to declare a type here) len = last -...
0
votes
1answer
42 views

PSET6 Server - fails the request two files in a row check

My server fails the last check in check50-server2 - "request two files in a row" Because it only fails that test I'm assuming the problem is somewhere in the parse or lookup functions. Valgrind shows ...
1
vote
2answers
85 views

Alternative to multiple if statements?

Just started this problem set about a day or two ago and while implementing lookup() I was wondering if there was an alternative to using multiple if statements to compare the path and return the MIME ...
1
vote
2answers
78 views

Pset6 check50 server1 parse error

I am having trouble addressing the below two errors when I run the first check50 of pset6. check50 2015.fall.pset6.server1 server.c :( Requesting cat.exe returns error code 501 \ expected output, ...
1
vote
2answers
123 views

pset6 server fails check50

I can't find why this doesn't work, can someon help me? Thanks. My code fails the following in check50 server1: :( Requesting cat.exe returns error code 501 \ expected output, but not "HTTP/1.1 ...
0
votes
1answer
63 views

debug50 segfault in pset6

I am having problems with debug50 since when I pass the executable through it, it gives me a segfault in the strncasecmp line. But if I execute the program normally, it works fine. This happens also ...
0
votes
0answers
39 views

pset6 lookup and parse - don't compile please help

I wrote codes for lookup and parse functions. It does not compile. Can anyone spot obvious errors?
0
votes
2answers
53 views

pset6: requesting php from within html isn't working

Almost there, I'm only failing the following two tests now: :( Requesting hello.php? returns 200, text/html, and correct output \ expected output, not an exit code of 0 :( Requesting hello.php?...
1
vote
1answer
133 views

Bug in the pset7 distribution code Lookup

When doing the symbol lookup in pest7, I noticed that a non-valid input for symbol (i.e., inputing "asdfafda") would not give a valid warning response. (Not on my computer and not on the staff ...
0
votes
0answers
102 views

Test file for pset's 6 lookup creates numerous errors

I've created a new file in order to test my lookup function for pset6. Here's the content of my test file: #include <stdio.h> #include "server.c" int main(int argc, char* argv[]) { ...
0
votes
1answer
62 views

Pset6 - check50 missing cat.exe and non-existant file request

I've been checking similar questions about the problem I'm having but couldn't solve it myself. Help would be really appreciated. After implementing lookup and parse and running check50 I'm receiving ...
0
votes
1answer
91 views

PSET6 check50 server1 cat.exe and non-existant file return error 505

So, i have looked everywhere for the answer to why my program returns error 505 for cat.exe and non-existant file. I have tested isolating the two functions but they work fine outside of the main ...
0
votes
1answer
278 views

Problem with check50 for server1

I know that when lookup returns NULL when called, error 501 should appear and that's what I did in lookup's implementation. If the extension of the file is none of the ones mentioned in the pset's ...
0
votes
1answer
55 views

(PSET6) hello.php always displays hello, hello, world regardless of input?

Me again. I've basically sorted out most of the issues now. I can load cat.html normally in the browser and indexes definitely works. From testing, I believe that my parse function is still fine. ...
0
votes
1answer
159 views

Need help with pset6, lookup and parse function!

I think my parse and lookup are working fine, but check50 is not happy. Maybe anyone has an idea. here my functions: const char* lookup(const char* path) { // if there is a path, compare and ...
0
votes
1answer
202 views

Pset6 one check50 error [duplicate]

Please help me. I have passed every check except 1. Here is my error: check50 2015.fall.pset6.server1 server.c :) server.c exists :) server compiles :) HTTP/1.0 returns error code 505 :) Method of '...
0
votes
1answer
69 views

Why Pset6 check cat.exe and non-existant file going wrong?

:( Requesting cat.exe returns error code 501 \ expected output, not an exit code of 0 :( Requesting non-existant file returns error code 404 \ expected output, not an exit code of 0 code for ...
0
votes
1answer
179 views

pset 6 server - Load produces inconsistent results

I'm really confused about what is wrong with my code as load works for certain files but not others and the reading of the file isn't something that is altered in any of the functions we're tasked ...
0
votes
1answer
128 views

pset6 server.c 403 forbidden for “/”, problems for lookup and indexes

I finished all four functions to my best knowledge but the server seems not working well. Once I started the program and then tried to access https://ide50-(myusername).cs50.io/, 403 forbidden popped ...
0
votes
1answer
181 views

Pset6 server.c Error 403

server.c is giving error(403) inside transfer function (written by default) lookup function : const char* lookup(const char* path) { char* s=(char*)calloc(20,1); strcpy(s,""); char *...
0
votes
1answer
142 views

first version of check50 not working pset6

I have almost completed lookup() and parse() function but check50(version 1) shows :( in 2 cases. Below is my check50 result. :) server.c exists :) server compiles :) HTTP/1.0 returns error code 505 :...
0
votes
1answer
456 views

Is it possible to code lookup function without malloc?

I have finally managed to have my WebServer working, but I would like to improve my implementation of the "lookup" function. The only option that avoided segfaults was to malloc a char* and use it as ...
1
vote
0answers
99 views

Cannot download csv file from yahoo in pset7

i have proxy server in my college through which the internet is accessed. I had setup my appliance to work with proxy as given in the cs50 appliance manual. Now in pset 7 while calling the lookup() ...