fabston / TradingView-Webhook-Bot

📊 Send TradingView alerts to Telegram, Discord, Slack, Twitter and Email.
MIT License
1.26k stars 392 forks source link

'NoneType' error #37

Closed stoofman closed 3 years ago

stoofman commented 3 years ago

When the bot is running and receives a tradingview alert, it is giving this error:

'NoneType' object is not subscriptable

fabston commented 3 years ago

Hi,

That is usually a wrong formatted json string. Please send me syntax you pasted into your TradingView alerts dialog.

stoofman commented 3 years ago

Hi I think you are right, I noticed { } were missing in my TradingView alert. This is my current TradingView alert format 👍 { "key": "AAD231DFEw",

"msg": "Long " }

and now I am getting this error :

2021-02-23 15:21:00 Alert Received & Sent! ERROR:discord_webhook.webhook:[1/1] Webhook status code 404: {"message": "404: Not Found", "code": 0}

fabston commented 3 years ago

Did you set your Discord Webhook in config.py?

stoofman commented 3 years ago

yes like this :

Discord Settings

send_discord_alerts = True discord_webhook = 'https://discord.com/api/webhooks/811726880858498546/m1D0ONAxbaVsddfHHGn124tgAyrPoERfFHjl3CNmIHaLuC2r4xx3' # Discord Webhook URL (https://support.discordapp.com/hc/de/articles/228383668-Webhooks-verwenden)

fabston commented 3 years ago

Oh OK. Please do not include: https://discord.com/api/webhooks/

A valid input would be: discord_webhook="811726880858498546/m1D0ONAxbaVsddfHHGn124tgAyrPoERfFHjl3CNmIHaLuC2r4xx3"

stoofman commented 3 years ago

awesome ,that works ! thank you so much ! :-)