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

Bug with pep8ify #64

Open
OrkoHunter opened this issue Oct 11, 2017 · 6 comments
Open

Bug with pep8ify #64

OrkoHunter opened this issue Oct 11, 2017 · 6 comments

Comments

@OrkoHunter
Copy link
Collaborator

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'
@OrkoHunter OrkoHunter added this to To do in Main board Mar 2, 2019
@OrkoHunter OrkoHunter moved this from To do to Low Priority To do in Main board Mar 2, 2019
@OrkoHunter
Copy link
Collaborator Author

Duplicate #24 #54

@FirePing32
Copy link

@FirePing32
Copy link

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 ?

@FirePing32
Copy link

@OrkoHunter Any update on this ?

@OrkoHunter
Copy link
Collaborator Author

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.

@FirePing32
Copy link

Yeah. I will try to figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Main board
  
Low Priority
Development

No branches or pull requests

2 participants