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

Attribute error #4

Closed
minerlab opened this issue Jan 18, 2019 · 6 comments
Closed

Attribute error #4

minerlab opened this issue Jan 18, 2019 · 6 comments

Comments

@minerlab
Copy link

Traceback (most recent call last):
File "nuats_bot.py", line 124, in
main()
File "nuats_bot.py", line 96, in main
if (len(notifications_list) > 0): broadcast_signals(notifications_list)
File "nuats_bot.py", line 28, in broadcast_signals
all_notifications_list = list(filter(None.ne, tickers_TA_list)) # Filter out tickers with no bull/bear notifications
AttributeError: 'NoneType' object has no attribute 'ne'

@b-fg
Copy link
Owner

b-fg commented Jan 19, 2019

Please show how to reproduce the error. For example show the config.py file and the Python version you are using.

@GoldenBoyBTC
Copy link

I'm using Python Python 2.7.15rc1. My config.py is this

I'm getting the same error.

@b-fg
Copy link
Owner

b-fg commented Jan 22, 2019

Have you modified the nuats_bot.py file as well? Please include a gist with that script too.

@GoldenBoyBTC
Copy link

Here it is. Didn't modified it at all.

@b-fg
Copy link
Owner

b-fg commented Jan 23, 2019

The problem comes from Python 2.7 for which the list filtering of None written in Python 3.6: all_notifications_list = list(filter(None.__ne__, tickers_TA_list)) is incompatible. You could use a list comprehension as a workaround: all_notifications_list = [x for x in tickers_TA_list if x is not None]. Or just switch to a more updated Python version... (Python 2.7 is from 2010).

On the other hand, another problem will arise regarding the Discord webhook because of your config.py - The line discord_web_hook = ['discord webhook url goes here']) in the config.py is not specifying a correct discord url webhook. Try discord_web_hook = ['']) to leave this option blank.

@b-fg b-fg closed this as completed Jan 23, 2019
@b-fg
Copy link
Owner

b-fg commented Jan 23, 2019

I have now included the Python 3.x requirement in the README.md file. Thanks for bringing it up.

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

3 participants