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

AttributeError: 'BinderUser' object has no attribute 'token' #35

Open
andersy005 opened this issue Jul 22, 2021 · 3 comments
Open

AttributeError: 'BinderUser' object has no attribute 'token' #35

andersy005 opened this issue Jul 22, 2021 · 3 comments

Comments

@andersy005
Copy link

While using binderbot-cli, I keep getting AttributeError: 'BinderUser' object has no attribute 'token'. This looks like a bug in binderbot (I could be wrong :)). I was wondering if anyone has run into this issue?

2021-07-22T18:12:08.5570278Z 2021-07-22 18:12.08 [info     ] Binder: Waiting on event stream (phase: failure) action=binder-start phase=event-stream
2021-07-22T18:12:09.6088711Z 2021-07-22 18:12.09 [info     ] Binder: Waiting on event stream (phase: Failed) action=binder-start phase=event-stream
2021-07-22T18:12:09.6194597Z 2021-07-22 18:12.09 [info     ] Binder: Waiting on event stream (phase: Failed) action=binder-start phase=event-stream
2021-07-22T18:12:09.6236193Z 2021-07-22 18:12.09 [info     ] Binder: Waiting on event stream (phase: built) action=binder-start phase=event-stream
2021-07-22T18:13:09.6284998Z 2021-07-22 18:13.09 [info     ] Kernel: Starting               action=kernel-start phase=start
2021-07-22T18:13:09.6286328Z 2021-07-22 18:13.09 [info     ] Kernel: Start failed 'BinderUser' object has no attribute 'token' action=kernel-start duration=6.499999997799932e-06 phase=failed
2021-07-22T18:13:09.7013567Z /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/binderbot/cli.py:14: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
2021-07-22T18:13:09.7014817Z   f = asyncio.coroutine(f)
2021-07-22T18:13:09.7015282Z Traceback (most recent call last):
2021-07-22T18:13:09.7017493Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/binderbot/binderbot.py", line 111, in start_kernel
2021-07-22T18:13:09.7019150Z     headers = {'Authorization': f'token {self.token}'}
2021-07-22T18:13:09.7020017Z AttributeError: 'BinderUser' object has no attribute 'token'
2021-07-22T18:13:09.7020604Z 
2021-07-22T18:13:09.7021116Z During handling of the above exception, another exception occurred:
2021-07-22T18:13:09.7021528Z 
2021-07-22T18:13:09.7021893Z Traceback (most recent call last):
2021-07-22T18:13:09.7022669Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/runpy.py", line 194, in _run_module_as_main
2021-07-22T18:13:09.7023548Z     return _run_code(code, main_globals, None,
2021-07-22T18:13:09.7024268Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/runpy.py", line 87, in _run_code
2021-07-22T18:13:09.7025045Z     exec(code, run_globals)
2021-07-22T18:13:09.7026409Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/binderbot/cli.py", line 78, in <module>
2021-07-22T18:13:09.7027403Z     sys.exit(main())  # pragma: no cover
2021-07-22T18:13:09.7028833Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
2021-07-22T18:13:09.7029783Z     return self.main(*args, **kwargs)
2021-07-22T18:13:09.7031105Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/click/core.py", line 1062, in main
2021-07-22T18:13:09.7031773Z     rv = self.invoke(ctx)
2021-07-22T18:13:09.7032696Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
2021-07-22T18:13:09.7033482Z     return ctx.invoke(self.callback, **ctx.params)
2021-07-22T18:13:09.7034650Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/click/core.py", line 763, in invoke
2021-07-22T18:13:09.7035345Z     return __callback(*args, **kwargs)
2021-07-22T18:13:09.7036287Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/binderbot/cli.py", line 17, in wrapper
2021-07-22T18:13:09.7037250Z     return loop.run_until_complete(f(*args, **kwargs))
2021-07-22T18:13:09.7038118Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
2021-07-22T18:13:09.7039124Z     return future.result()
2021-07-22T18:13:09.7040513Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/binderbot/cli.py", line 60, in main
2021-07-22T18:13:09.7041248Z     errors = await jovyan.run(filenames,
2021-07-22T18:13:09.7042275Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/binderbot/binderbot.py", line 304, in run
2021-07-22T18:13:09.7043200Z     await self.start_kernel()
2021-07-22T18:13:09.7044445Z   File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/binderbot/binderbot.py", line 115, in start_kernel
2021-07-22T18:13:09.7045463Z     raise OperationError()
2021-07-22T18:13:09.7046498Z binderbot.binderbot.OperationError
2021-07-22T18:13:09.7454920Z ##[error]Process completed with exit code 1.
@rabernat
Copy link
Contributor

rabernat commented Feb 2, 2022

Anderson, I am trying to fix pangeo gallery and am returning to this issue.

When you got this error, were you trying to run against https://aws-uswest2-binder.pangeo.io/? If so, that would explain things. That hub requires github auth.

How can we create a valid auth token for binderbot to access a protected binder. @yuvipanda any ideas?

@andersy005
Copy link
Author

When you got this error, were you trying to run against aws-uswest2-binder.pangeo.io?

Yes. At the time, this binder was going through lots of changes and the GitHub auth may have been one of them...

@rabernat
Copy link
Contributor

rabernat commented Feb 2, 2022

I think it's actually a useful problem to solve. If we can figure this out, we can basically use a private binder as a CI service. That will be super useful.

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