robswc / tradingview-webhooks-bot

a framework 🏗 for trading with tradingview webhooks!
http://tvwb.robswc.me
GNU General Public License v3.0
591 stars 180 forks source link

what ı did wrong #18

Closed alituzcu closed 1 year ago

alituzcu commented 4 years ago
                                                                                                                                                       ^

SyntaxError: unexpected EOF while parsing 127.0.0.1 - - [10/May/2020 19:24:59] "POST /webhook HTTP/1.1" 500 - [2020-05-10 19:25:05,541] ERROR in app: Exception on /webhook [POST] Traceback (most recent call last): File "C:\Users\ali\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "C:\Users\ali\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Users\ali\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Users\ali\AppData\Roaming\Python\Python38\site-packages\flask_compat.py", line 39, in reraise raise value File "C:\Users\ali\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "C:\Users\ali\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "C:\tradingview-webhooks-bot-master\tradingview-webhooks-bot\webhook-bot.py", line 30, in webhook data = parse_webhook(request.get_data(as_text=True)) File "C:\tradingview-webhooks-bot-master\tradingview-webhooks-bot\actions.py", line 13, in parse_webhook data = ast.literal_eval(webhook_data) File "C:\Users\ali\AppData\Local\Programs\Python\Python38-32\lib\ast.py", line 59, in literal_eval node_or_string = parse(node_or_string, mode='eval') File "C:\Users\ali\AppData\Local\Programs\Python\Python38-32\lib\ast.py", line 47, in parse return compile(source, filename, mode, flags, File "", line 1 {"type": "market", "side": "buy", "amount": "15", "symbol": "XBTUSD", "price": "None", "key": "a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2" ^ SyntaxError: unexpected EOF while parsing 127.0.0.1 - - [10/May/2020 19:25:05] "POST /webhook HTTP/1.1" 500

please who can help me ı dont know python ı am trying to learn ,,,, if someone want to help to me he can connect via teamview to my pc

robswc commented 4 years ago

Hey! Check if you have a closing } at the end of the json data. See if that fixes it and lmk if it doesn't!

alituzcu commented 4 years ago

C:\Users\ali\AppData\Local\Programs\Python\Python37\python.exe C:/Users/ali/Desktop/alaarm/tradingview-webhooks-bot/webhook-bot.py

ı wrote this for tradingview alarm , is it right or wong

{"type": "market", "side": "buy", "amount": "15", "symbol": "XBT/USD", "price": "None", "key": "7e7ef69da7248742e869378f8421880cf8f0017f96d94d086813baa518a65489"}

robert a lot peope dont know python vs but want to somtings you made good program but ı and like me a lot people cant use it ,if you add step step a video for your app we can use it can you put with pycarm then ı think everything will be easy thanks robert

robswc commented 4 years ago

hey! I'll try to make a video for this actually. I've wanted to rework this project for awhile, in the mean time, try changing the: "amount": "1000" to just "amount": 1000

no quotes around the 1000. When representing numbers you rarely need quotes :)