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

Error on startup in mount_sidebar #21

Open
roveo opened this issue Aug 8, 2018 · 10 comments
Open

Error on startup in mount_sidebar #21

roveo opened this issue Aug 8, 2018 · 10 comments

Comments

@roveo
Copy link

roveo commented Aug 8, 2018

Here's the error:

Task exception was never retrieved
future: <Task finished coro=<App.component_did_mount() done, defined at app.py:97> exception=KeyError('groups',)>
Traceback (most recent call last):
  File "app.py", line 100, in component_did_mount
    yield from self.mount_sidebar(executor)
  File "app.py", line 109, in mount_sidebar
    loop.run_in_executor(executor, self.store.load_users)
  File "/Users/roveo/.pyenv/versions/3.6.6/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/roveo/sclack/sclack/store.py", line 99, in load_groups
    self.state.groups = self.slack.api_call('mpim.list')['groups']
KeyError: 'groups'
@haskellcamargo
Copy link
Owner

It seems like the Slack API has denied the request. This happens often when the same endpoint is requested too many times (Slack API has rating limits). I'll be working on a retry-attempt for requests to handle this kind of issue without breaking the things. Thanks!

@MarcosEich
Copy link

I am also getting an error on startup, maybe it is related.

Traceback (most recent call last):
  File "./app.py", line 560, in <module>
    app.start()
  File "./app.py", line 62, in start
    self.urwid_loop.run()
  File "/usr/local/lib/python3.7/site-packages/urwid/main_loop.py", line 286, in run
    self._run()
  File "/usr/local/lib/python3.7/site-packages/urwid/main_loop.py", line 384, in _run
    self.event_loop.run()
  File "./app.py", line 28, in run
    self._loop.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 523, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1722, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/local/lib/python3.7/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)

@niltonvasques
Copy link

Same for me but with a different message:

image

@behconsci
Copy link

for me also not working. same message.

@behconsci
Copy link

ok it says, we need to give these scopes:

image

@behconsci
Copy link

I will make a PR for this with better error messages

@coryshaw1
Copy link
Contributor

Also having issues on startup:

'channels'
File "./app.py", line 126, in component_did_mount
 yield from self.mount_sidebar(executor)
File "./app.py", line 135, in mount_sidebar
loop.run_in_executor(executor, self.store.load_users)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/coryshaw/Documents/Code/sclack/sclack/store.py", line 86, in load_channels)['channels']

@behconsci
Copy link

behconsci commented Aug 15, 2018 via email

@coryshaw1
Copy link
Contributor

coryshaw1 commented Aug 15, 2018

Was able to output the response from the Slack API:

{'ok': False, 'error': 'not_allowed_token_type', ...}

I'm using tokens generated here: https://api.slack.com/custom-integrations/legacy-tokens

And my .sclack file looks like:

{
    "workspaces": {
        "default": "xoxp-xxxx-xxxx-xxxx",
        "another": "xoxp-xxxx-xxxx-xxxx"
    }
}

Do some Slack workspaces have the ability to disable legacy tokens?

@behconsci
Copy link

behconsci commented Aug 15, 2018 via email

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

6 participants