TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
zjay096 opened this issue · comments
Hi, hope you are having a wonderful day.
Im Running:
CPLEX Studio IDE 12.9.0 Academic Version
Python 3.7.4
Windows 7 SP1
Modified:
Commented out -- > main.py:36-37 (kucoin_move_to_trade())
API Key --> utils.py
And getting this error:
path_optimizer.py:239: FutureWarning: Using a non-tuple sequence for multidimensiona
l indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the fu
ture this will be interpreted as an array index, `arr[np.array(seq)]`, which wil
l result either in an error or a different result.
exc_name]
Traceback (most recent call last):
File "main.py", line 40, in <module>
path_optimizer.find_arbitrage()
File "C:\Users\WeilZa01\Downloads\crypto-arbitrage-framework-master\crypto\cry
pto\path_optimizer.py", line 102, in find_arbitrage
self.update_objectives()
File "C:\Users\WeilZa01\Downloads\crypto-arbitrage-framework-master\crypto\cry
pto\path_optimizer.py", line 278, in update_objectives
self.update_vol_matrix()
File "C:\Users\WeilZa01\Downloads\crypto-arbitrage-framework-master\crypto\cry
pto\path_optimizer.py", line 301, in update_vol_matrix
usd_values[key] = val['baseVolume'] * self.crypto_prices[base_coin]['price']
* percentile
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
Is this a known issue?
Regards.
Hi, thank you for pointing this out, this issue is because Coin Market Cap API added some new coins recently whose prices might not be accessible, thus leading to 'NoneType'. I have done some slight changes in the latest commit, it should be ok now.