pep8speaks
pep8speaks copied to clipboard
Bug with pep8ify
pep8ify is not working. The issue is not urgent as the command is not being used much.
2017-10-11T17:33:24.024103+00:00 app[web.1]: [2017-10-11 17:33:24,022] ERROR in app: Exception on / [POST]
2017-10-11T17:33:24.024122+00:00 app[web.1]: Traceback (most recent call last):
2017-10-11T17:33:24.024123+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1988, in wsgi_app
2017-10-11T17:33:24.024124+00:00 app[web.1]: response = self.full_dispatch_request()
2017-10-11T17:33:24.024125+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1641, in full_dispatch_request
2017-10-11T17:33:24.024126+00:00 app[web.1]: rv = self.handle_user_exception(e)
2017-10-11T17:33:24.024127+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1544, in handle_user_exception
2017-10-11T17:33:24.024127+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2017-10-11T17:33:24.024128+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
2017-10-11T17:33:24.024129+00:00 app[web.1]: raise value
2017-10-11T17:33:24.024129+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1639, in full_dispatch_request
2017-10-11T17:33:24.024130+00:00 app[web.1]: rv = self.dispatch_request()
2017-10-11T17:33:24.024131+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1625, in dispatch_request
2017-10-11T17:33:24.024131+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2017-10-11T17:33:24.024132+00:00 app[web.1]: File "/app/app.py", line 56, in main
2017-10-11T17:33:24.024132+00:00 app[web.1]: event_to_action[event](request)
2017-10-11T17:33:24.024134+00:00 app[web.1]: File "/app/pep8speaks/handlers.py", line 246, in handle_issue_comment
2017-10-11T17:33:24.024134+00:00 app[web.1]: return _pep8ify(ghrequest, config)
2017-10-11T17:33:24.024135+00:00 app[web.1]: File "/app/pep8speaks/handlers.py", line 125, in _pep8ify
2017-10-11T17:33:24.024136+00:00 app[web.1]: helpers.update_fork_desc(ghrequest)
2017-10-11T17:33:24.024136+00:00 app[web.1]: File "/app/pep8speaks/helpers.py", line 456, in update_fork_desc
2017-10-11T17:33:24.024137+00:00 app[web.1]: query = "/repos/{}".format(ghrequest.fork_fullname)
2017-10-11T17:33:24.024137+00:00 app[web.1]: AttributeError: 'GHRequest' object has no attribute 'fork_fullname'
Duplicate #24 #54
https://github.com/OrkoHunter/pep8speaks/blob/837643bb95c18a5364cd0539b0f8edaeb3813a76/pep8speaks/handlers.py#L100-L103
It seems fork_fullname
is not defined here. What do you think @OrkoHunter ?
https://github.com/OrkoHunter/pep8speaks/blob/837643bb95c18a5364cd0539b0f8edaeb3813a76/pep8speaks/helpers.py#L499-L533
Here, we define ghrequest.fork_fullname
for the first time at line 504
, and that also inside the fork_for_pr()
function. So, it is not globally accessible. Is that the correct reason for the error shown above @OrkoHunter ?
@OrkoHunter Any update on this ?
Hey @prakhargurunani ! Thank you very much for looking into this problem. Unfortunately, I am a bit occupied and won't be able to work on it. But I also don't want to be a blocker, so go ahead and experiment as you like. :)
It seems fork_fullname is not defined here. What do you think @OrkoHunter ?
Might be a good idea to dump the object and see if the key is included there. You can start local pep8speaks server and send GitHub-like payloads manually to your local pep8speaks server.
Yeah. I will try to figure it out.