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

App crashes when running collect_data #1

Open
forsgren opened this issue Dec 26, 2015 · 4 comments
Open

App crashes when running collect_data #1

forsgren opened this issue Dec 26, 2015 · 4 comments

Comments

@forsgren
Copy link

This is the printout in the terminal:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/Library/Python/2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "app.py", line 96, in collect_data
    token = request.session['access_token']
  File "/Library/Python/2.7/site-packages/Beaker-1.7.0-py2.7.egg/beaker/session.py", line 672, in __getitem__
    return self._session()[key]
KeyError: 'access_token'
127.0.0.1 - - [26/Dec/2015 22:02:11] "GET /collect_data HTTP/1.1" 500 753
@trevorprater
Copy link
Owner

It is likely that you are still using my client-secret. I did not intend to share this publicly, so I was forced to reset the value. If you generate a new client-key and client-secret via instagram, the app is likely to work.

@forsgren
Copy link
Author

I've generated new client-key and client-secret (created my own Instagram app through their dev pages), and added them to the code (both in app.py and wholikes.py). Still getting the same error.

@forsgren
Copy link
Author

Just noticed I'm getting a "[Errno 13] Permission denied" when I click "Connect with Instagram". Any particular permissions that has to be set up?

@forsgren
Copy link
Author

Here's a bit more precise description on what's happening for me

Action: Making a request to http://localhost:8515/
Output in terminal:

127.0.0.1 - - [27/Dec/2015 11:14:51] "GET / HTTP/1.1" 200 221

Action: Clicking "Connect with Instagram"
Output in terminal:

[Errno 13] Permission denied
127.0.0.1 - - [27/Dec/2015 11:14:56] "GET /oauth_callback?code=[code_manually_removed] HTTP/1.1" 200 78

Action: Clicking "Collect Data"
Output in terminal:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/Library/Python/2.7/site-packages/bottle-0.12.9-py2.7.egg/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "app.py", line 96, in collect_data
    token = request.session['access_token']
  File "/Library/Python/2.7/site-packages/Beaker-1.7.0-py2.7.egg/beaker/session.py", line 672, in __getitem__
    return self._session()[key]
KeyError: 'access_token'

Update 2015-12-27 11:37:
It seems as if it's the line

access_token, user_info = unauthenticated_api.exchange_code_for_access_token(code)

that triggers the "[Errno 13] Permission denied" message

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

2 participants