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

Probable race condition on file_to_check.py #140

Open
OrkoHunter opened this issue Jul 5, 2019 · 0 comments
Open

Probable race condition on file_to_check.py #140

OrkoHunter opened this issue Jul 5, 2019 · 0 comments

Comments

@OrkoHunter
Copy link
Collaborator

See the log message (related issue #139).

05 Jul 2019 21:33:53.738187 <190>1 2019-07-05T16:03:53.618619+00:00 app web.1 - - DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
05 Jul 2019 21:33:54.180176 <190>1 2019-07-05T16:03:51.535928+00:00 app web.1 - - DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.github.com:443
05 Jul 2019 21:33:54.180187 <190>1 2019-07-05T16:03:51.587207+00:00 app web.1 - - DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
05 Jul 2019 21:33:54.180208 <190>1 2019-07-05T16:03:51.641273+00:00 app web.1 - - DEBUG:urllib3.connectionpool:https://api.github.com:443 "GET /repos/asrmarco13/Pycolee/pulls/1 HTTP/1.1" 200 13581
05 Jul 2019 21:33:54.180187 <190>1 2019-07-05T16:03:51.658728+00:00 app web.1 - - DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
05 Jul 2019 21:33:54.180298 <190>1 2019-07-05T16:03:51.725768+00:00 app web.1 - - DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /chembl/GLaDOS/64181f53392a8e40e92703b7a68062ab819662a5//src/glados/es/ws2es/mappings/es_chembl_go_slim_mapping.py HTTP/1.1" 200 855
05 Jul 2019 21:33:54.464265 <190>1 2019-07-05T16:03:51.825464+00:00 app web.1 - - DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /asrmarco13/Pycolee/9fe105cae2ae5d2796a1206f5c82b0a192045090//exercises/conto1.py HTTP/1.1" 200 516
05 Jul 2019 21:33:54.464187 <190>1 2019-07-05T16:03:51.880886+00:00 app web.1 - - DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): raw.githubusercontent.com:443
05 Jul 2019 21:33:54.464131 <190>1 2019-07-05T16:03:51.969657+00:00 app web.1 - - ERROR:flask.app:Exception on / [POST]
05 Jul 2019 21:33:54.464128 <190>1 2019-07-05T16:03:51.969661+00:00 app web.1 - - Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/app/.heroku/python/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/.heroku/python/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/server.py", line 38, in main
    return event_to_action[event](request)
  File "/app/pep8speaks/handlers.py", line 35, in handle_pull_request
    helpers.run_pycodestyle(ghrequest, config)
  File "/app/pep8speaks/helpers.py", line 261, in run_pycodestyle
    os.remove("file_to_check.py")
FileNotFoundError: [Errno 2] No such file or directory: 'file_to_check.py'Exception
05 Jul 2019 21:33:54.505297 <158>1 2019-07-05T16:03:51.972094+00:00 heroku router - - at=info method=POST path="/" host=pep8speaks.herokuapp.com request_id=33e3eb24-f68f-4dea-98c2-99f953eac97d fwd="140.82.115.9" dyno=web.1 connect=0ms service=1368ms status=500 bytes=456 protocol=https
05 Jul 2019 21:33:54.536301 <190>1 2019-07-05T16:03:52.041137+00:00 app web.1 - - DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /chembl/GLaDOS/64181f53392a8e40e92703b7a68062ab819662a5//src/glados/es/ws2es/mappings/es_chembl_mechanism_mapping.py HTTP/1.1" 200 1483
05 Jul 2019 21:33:54.650308 <190>1 2019-07-05T16:03:54.358548+00:00 app web.1 - - DEBUG:urllib3.connectionpool:https://raw.githubusercontent.com:443 "GET /chembl/GLaDOS/64181f53392a8e40e92703b7a68062ab819662a5//src/glados/es/ws2es/mappings/es_chembl_target_component_mapping.py HTTP/1.1" 200 5506
05 Jul 2019 21:33:54.650126 <190>1 2019-07-05T16:03:54.414186+00:00 app web.1 - - DEBUG:flask.app:Request Headers:
05 Jul 2019 21:33:54.650125 <190>1 2019-07-05T16:03:54.414191+00:00 app web.1 - - Host: pep8speaks.herokuapp.com
05 Jul 2019 21:33:54.650112 <190>1 2019-07-05T16:03:54.414193+00:00 app web.1 - - Connection: close
05 Jul 2019 21:33:54.650106 <190>1 2019-07-05T16:03:54.414196+00:00 app web.1 - - Accept: */*

A good way to avoid this is to create file_to_check_.py for each process and so, this exception would not occur again.

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

No branches or pull requests

2 participants