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

reading a file when required. discussion needed. #39

Closed
1 of 5 tasks
shivankgtm opened this issue Jan 19, 2019 · 7 comments
Closed
1 of 5 tasks

reading a file when required. discussion needed. #39

shivankgtm opened this issue Jan 19, 2019 · 7 comments
Labels
Discussion/Doubts/Tutorial A discussion to understand some topic

Comments

@shivankgtm
Copy link
Contributor

shivankgtm commented Jan 19, 2019

  • **I am submitting this regarding **

    • Bug report
    • Feature request
    • Support request
    • Help request
    • Discussion or tutorial wanted
  • Description of the ISSUE:
    currently, the file is read everytime server is run.
    I want the file to be read only when it's required and someone is uploading his file to be checked.

@shivankgtm shivankgtm added the Discussion/Doubts/Tutorial A discussion to understand some topic label Jan 19, 2019
@theSage21
Copy link
Member

  • Server is run once. Always
  • Url is called >= 0 times.

That's why file read code is outside the url call.

@theSage21
Copy link
Member

Typically, the server is run once and then it keeps on running. It is only restarted if something goes wrong or if code needs to be updated in the server.

@shivankgtm
Copy link
Contributor Author

but when we will have more question. will we still open all the files?
for now, only one file is required so we file read code is outside URL code. but in the future, we will not need all expected_outputs. we will need expected_outputs only for given question number.

am i getting it right ?

@theSage21
Copy link
Member

theSage21 commented Jan 19, 2019 via email

@shivankgtm
Copy link
Contributor Author

Ohk, That's a lot of space :D

    1. another thing which I just faced is this, don't know how it got missed.
      expected = expected.strip() UnboundLocalError: local variable 'expected' referenced before assignment
      while running server.py.
      so we will need to add a global expected in url_upload.
    1. it's giving 'Wrong answer' even I am submitting the right answer.
      looks like we are going to need more issues.

@theSage21
Copy link
Member

theSage21 commented Jan 19, 2019 via email

@shivankgtm
Copy link
Contributor Author

I will positively do it in night. and i will add global expected myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion/Doubts/Tutorial A discussion to understand some topic
Projects
None yet
Development

No branches or pull requests

2 participants