Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with line 20 in server.py while running the server using python server.py #71

Closed
gauravrock opened this issue Jan 27, 2019 · 12 comments

Comments

@gauravrock
Copy link
Contributor

some problem on line 20 server.py while running the server using python server.py(it happens sometimes)

screenshot 2019-01-27 at 12 31 36 am

@shivankgtm
Copy link
Contributor

can you share your folder structure ?

@shivankgtm
Copy link
Contributor

i think it's case of mac. and we need to add DS_Store in .gitignore.

@gauravrock
Copy link
Contributor Author

I' ll try to do it @shivank98. it happens sometimes once it runs but somehow whenever it gets 404 error the next time it gives this error.

@shivankgtm
Copy link
Contributor

shivankgtm commented Jan 27, 2019 via email

@theSage21
Copy link
Member

actually the problem comes from line 18 which assumes that there will be no extra folders in the listing. We can do a simple check like

for i in os.listdir(question_dir):
    if not i.isdigit():
        continue
    # continue with the rest of the stuff

@theSage21
Copy link
Member

the error is coming because it's trying to find a file there in the path with the DS folder.

@theSage21
Copy link
Member

Perhaps someone can put up a PR which fixes this?

@arnabsinha99
Copy link
Contributor

I am still getting the 404 Not found error. Could anyone whose server.py is running, help?

@gauravrock
Copy link
Contributor Author

I am still getting the 404 Not found error. Could anyone whose server.py is running, help?

share the screenshot @arnabsinha99 please

@arnabsinha99
Copy link
Contributor

I am still getting the 404 Not found error. Could anyone whose server.py is running, help?

share the screenshot @arnabsinha99 please

screenshot 78
screenshot 79

@gauravrock
Copy link
Contributor Author

@arnabsinha99 your server is running. Please enter this URL after running the server.py: http://localhost:8080/question/1

@arnabsinha99
Copy link
Contributor

alright. that worked thanks!. some more issues I faced are :-

  • The "download test cases" is not giving me the test case file

  • It is giving the wrong answer for "sum of two numbers" even though my output file is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants