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.py cannot work and got the error 'message': 'Failed to subscribe', 'reason': 'No channels provided' #112

Closed
chuanyinhuang opened this issue Oct 15, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@chuanyinhuang
Copy link

Hi @pmaji,

When I try to launch app.py then I got some exception as below,

127.0.0.1 - - [16/Oct/2019 01:16:10] "POST /_dash-update-component HTTP/1.1" 200 -
Exception in thread Thread-65:
Traceback (most recent call last):
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\site-packages\cbpro\websocket_client.py", line 41, in _go
    self._listen()
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\site-packages\cbpro\websocket_client.py", line 91, in _listen
    self.on_message(msg)
  File "C:\Users\Alex\Desktop\crypto-whale-watching-app-master\gdax_book.py", line 21, in on_message
    sequence = message['sequence']
**KeyError: 'sequence'**

Then I set a break point at

    def on_message(self, message):
        sequence = message['sequence']

to figure out what happens, then I got the error as below,
<class 'dict'>: {'type': 'error', 'message': 'Failed to subscribe', 'reason': '**No channels provided**'}

Could you give me guidance on how to solve this problem? Thank you.

@pmaji pmaji added the bug Something isn't working label Oct 16, 2019
@pmaji pmaji self-assigned this Oct 16, 2019
@pmaji
Copy link
Owner

pmaji commented Oct 16, 2019

Hmmm @chuanyinhuang I'm not entirely sure about this one. So getting errors about failure to subscribe is actually quite normally. Sadly, the APIs we're using aren't that great from a tps perspective, and we use a couple third-party packages for the data pulls that can be less than 100% reliable. That said, this shouldn't be breaking (it isn't for me and many others), so that makes me suspect there's something fishy with either your environment or package versions, etc.

My advice would be to start up a new virtual environment (conda or otherwise) and then install packages only based on the requirements.txt. Then once that is working without a problem, run the app out of the virtual environment and give it maybe 2ish minutes total (that's the absolute LONGEST it should probably take to get all the connections set), and then go to your local host to be sure it's running. Aside from that, I don't have any sage advice I'm afraid. Hope this helps som!

@pmaji
Copy link
Owner

pmaji commented Oct 16, 2019

Closing this for now. If you feel the need to re-open later on feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants