pokerwars / pokerwars.io-starterbot-python

A starter bot written in python for the pokerwars.io platform. To play: pull this code, register on pokerwars.io, get your API token and play!
https://www.pokerwars.io/
44 stars 11 forks source link

Question #3

Closed stanjaromin closed 4 years ago

stanjaromin commented 4 years ago

Hi, I am trying to use your code but I get only this: Bottle v0.12.18 server starting up (using WSGIRefServer())... Listening on http://127.0.0.1:3000/ Hit Ctrl-C to quit.

Trying to subscribe to pokerwars.io ...

Is it correct?

Best regards!

francescopeloi commented 4 years ago

hey @stanjaromin ,

have you added the properties with your token and bot IP address?

stanjaromin commented 4 years ago

Hi Francesco, yes i did, according to instructions. I was running the code from Pycharm however today I tried from command line and got the same. Is the http://127.0.0.1:3000/ OK or there should be my IP address?

francescopeloi commented 4 years ago

hey @stanjaromin ,

I tried today from the command line and it worked fine:

Trying to subscribe to pokerwars.io ...
Bottle v0.12.17 server starting up (using WSGIRefServer())...
Listening on http://127.0.0.1:3000/
Hit Ctrl-C to quit.

Received ping from pokerwars.io, responding with a pong
127.0.0.1 - - [01/Mar/2020 10:46:11] "GET /pokerwars.io/ping HTTP/1.1" 200 14
Received ping from pokerwars.io, responding with a pong
127.0.0.1 - - [01/Mar/2020 10:46:12] "GET /pokerwars.io/ping HTTP/1.1" 200 14
Received ping from pokerwars.io, responding with a pong
127.0.0.1 - - [01/Mar/2020 10:46:12] "GET /pokerwars.io/ping HTTP/1.1" 200 14
Subscription --> Status code: 202
Subscription --> Body: {u'reason': u'user francescopeloi has access and his/her bot endpoint is also valid. Subscribing bot http://blablabla.ngrok.io', u'statusDescription': u'Accepted', u'success': True, u'statusCode': 202}
Received notification
{u'message': u'Tournament id 6012813699899016511 started with bots [....usernames....]', u'type': u'tournament_started'}

You should put your IP in the bot_endpoint variable, so we know where you bot is and we can communicate with it, e.g.:

bot_endpoint = 'http://be8f8d72.ngrok.io'

stanjaromin commented 4 years ago

Thak you Francesco, it still doesn't work. The strange thing is that the Java version works without issues on my machine with the same port declared. I will keep searching for the source of problem on my machine. Thank you for making sure the Python version is working.