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

can not place an order when change from sxpbtc to linkbtc pair. #36

Open
gzf445 opened this issue Nov 16, 2020 · 0 comments
Open

can not place an order when change from sxpbtc to linkbtc pair. #36

gzf445 opened this issue Nov 16, 2020 · 0 comments

Comments

@gzf445
Copy link

gzf445 commented Nov 16, 2020

the system working on sxpbtc pair,and i want to change it to linkbtc this error happen.

2020-11-16 20:51:40,406 - ERROR - Error in master.process_event()
Traceback (most recent call last):
File "/root/copyusdt/SlaveContainer.py", line 53, in on_event_handler
p_event = self.master.process_event(event)
File "/root/copyusdt/ExchangeInterfaces/BinanceExchange.py", line 138, in process_event
self.get_part(order_event['s'], order_event['q'], order_event['p'], order_event['S']),
File "/root/copyusdt/ExchangeInterfaces/BinanceExchange.py", line 202, in get_part
balance = float(get_context_balance(symbol)['free'])
File "/root/copyusdt/ExchangeInterfaces/BinanceExchange.py", line 186, in _get_balance_market_by_symbol
return list(filter(lambda el: el['asset'] == symbol[3:], self.get_balance()))[0]
IndexError: list index out of range
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
--- ---
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 243, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/usr/local/lib/python3.7/dist-packages/twisted/protocols/tls.py", line 330, in dataReceived
self._flushReceiveBIO()
File "/usr/local/lib/python3.7/dist-packages/twisted/protocols/tls.py", line 295, in _flushReceiveBIO
ProtocolWrapper.dataReceived(self, bytes)
File "/usr/local/lib/python3.7/dist-packages/twisted/protocols/policies.py", line 120, in dataReceived
self.wrappedProtocol.dataReceived(data)
File "/usr/local/lib/python3.7/dist-packages/autobahn/twisted/websocket.py", line 290, in dataReceived
self._dataReceived(data)
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1206, in _dataReceived
self.consumeData()
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1218, in consumeData
while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED:
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1578, in processData
fr = self.onFrameEnd()
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1703, in onFrameEnd
self._onMessageEnd()
File "/usr/local/lib/python3.7/dist-packages/autobahn/twisted/websocket.py", line 318, in _onMessageEnd
self.onMessageEnd()
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 627, in onMessageEnd
self._onMessage(payload, self.message_is_binary)
File "/usr/local/lib/python3.7/dist-packages/autobahn/twisted/websocket.py", line 321, in _onMessage
self.onMessage(payload, isBinary)
File "/usr/local/lib/python3.7/dist-packages/binance/websockets.py", line 32, in onMessage
self.factory.callback(payload_obj)
File "/root/copyusdt/SlaveContainer.py", line 57, in on_event_handler
if p_event is None:
builtins.UnboundLocalError: local variable 'p_event' referenced before assignment

Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/binance/websockets.py", line 586, in run
reactor.run(installSignalHandlers=False)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/base.py", line 1295, in mainLoop
self.doIteration(t)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/epollreactor.py", line 235, in doPoll
log.callWithLogger(selectable, _drdw, selectable, fd, event)
--- ---
File "/usr/local/lib/python3.7/dist-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/posixbase.py", line 627, in _doReadOrWrite
self._disconnectSelectable(selectable, why, inRead)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/posixbase.py", line 258, in _disconnectSelectable
selectable.connectionLost(failure.Failure(why))
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 519, in connectionLost
self._commonConnection.connectionLost(self, reason)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/tcp.py", line 327, in connectionLost
protocol.connectionLost(reason)
File "/usr/local/lib/python3.7/dist-packages/twisted/protocols/tls.py", line 398, in connectionLost
self._flushReceiveBIO()
File "/usr/local/lib/python3.7/dist-packages/twisted/protocols/tls.py", line 295, in _flushReceiveBIO
ProtocolWrapper.dataReceived(self, bytes)
File "/usr/local/lib/python3.7/dist-packages/twisted/protocols/policies.py", line 120, in dataReceived
self.wrappedProtocol.dataReceived(data)
File "/usr/local/lib/python3.7/dist-packages/autobahn/twisted/websocket.py", line 290, in dataReceived
self._dataReceived(data)
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1206, in _dataReceived
self.consumeData()
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1218, in consumeData
while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED:
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1570, in processData
fr = self.onFrameData(payload)
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 1665, in onFrameData
self._onMessageFrameData(payload)
File "/usr/local/lib/python3.7/dist-packages/autobahn/twisted/websocket.py", line 309, in _onMessageFrameData
self.onMessageFrameData(payload)
File "/usr/local/lib/python3.7/dist-packages/autobahn/websocket/protocol.py", line 601, in onMessageFrameData
self.frame_data.append(payload)
builtins.AttributeError: 'NoneType' object has no attribute 'append'

mokolotron added a commit to mokolotron/Crypto-Copy-Trader that referenced this issue Nov 22, 2020
MohammedRashad pushed a commit that referenced this issue Nov 23, 2020
Fix Issue #36. Add BinanceExchange.symbols_info
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

1 participant