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

cant test the bot using test.py #3

Open
rohit366 opened this issue Jan 7, 2018 · 0 comments
Open

cant test the bot using test.py #3

rohit366 opened this issue Jan 7, 2018 · 0 comments

Comments

@rohit366
Copy link

rohit366 commented Jan 7, 2018

I have been trying to check the bot response using test.py file and getting this error but when I run the main.py this error never appears.

C:\Users\DeathStar\Dropbox\Server keys\Monitors & Traders\Git Files\mcafee2cash>pipenv run python test.py
Test: get_coins_bittrex passed
Test: extract_symbols passed
Test: get_sentiment_analysis passed
Test: get_verdict passed
Test: analyze passed
482598433
Running bot...
Test: telegram_summary passed
482598433
Running bot...
Traceback (most recent call last):
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot\loop.py", line 60, in run_forever
allowed_updates=allowed_updates)
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot_init_.py", line 993, in getUpdates
return self._api_request('getUpdates', rectify(p))
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot_init
.py", line 491, in _api_request
return api.request((self._token, method, params, files), **kwargs)
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot\api.py", line 155, in request
return _parse(r)
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot\api.py", line 150, in parse
raise exception.TelegramError(description, error_code, data)
telepot.exception.TelegramError: ('Conflict: terminated by other long poll or webhook', 409, {'ok': False, 'error_code': 409, 'description': 'Conflict: terminated by other long poll or webhook'})
Traceback (most recent call last):
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot\loop.py", line 60, in run_forever
allowed_updates=allowed_updates)
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot_init
.py", line 993, in getUpdates
return self._api_request('getUpdates', rectify(p))
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot_init
.py", line 491, in _api_request
return api.request((self._token, method, params, files), **kwargs)
Test: telegram_buy failed
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot\api.py", line 155, in request
return _parse(r)
File "C:\Users\DeathStar.virtualenvs\mcafee2cash-8uNjmB4s\lib\site-packages\telepot\api.py", line 150, in _parse
raise exception.TelegramError(description, error_code, data)
Traceback (most recent call last):
telepot.exception.TelegramError: ('Conflict: terminated by other long poll or webhook', 409, {'ok': False, 'error_code': 409, 'description': 'Conflict: terminated by other long poll or webhook'})
File "test.py", line 118, in test_telegram_buy
replies = main.bot.get_query_replies(query_data)
File "C:\Users\DeathStar\Dropbox\Server keys\Monitors & Traders\Git Files\mcafee2cash\telegram.py", line 158, in get_query_replies
replies.append((f'Send me an amount in BTC or /cancel ({self.bittrex_utils.get_available_balance("BTC")} BTC available)', None))
File "C:\Users\DeathStar\Dropbox\Server keys\Monitors & Traders\Git Files\mcafee2cash\bittrex_utils.py", line 37, in get_available_balance
return self.my_bittrex.get_balance(symbol)["result"]["Available"]
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test.py", line 195, in
raise e
File "test.py", line 192, in
test_queuetest_name
File "test.py", line 123, in test_telegram_buy
raise AssertionError(e)
AssertionError: 'NoneType' object is not subscriptable

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