epifab / pypoker Goto Github PK
View Code? Open in Web Editor NEWPython poker game application (holdem, traditional 5 card draw)
Home Page: https://pypoker.herokuapp.com
License: GNU General Public License v3.0
Python poker game application (holdem, traditional 5 card draw)
Home Page: https://pypoker.herokuapp.com
License: GNU General Public License v3.0
Hi,
I'm new to web-apps, and am trying to get a functioning one to tweak for a christmas lockdown poker game, so thanks for the nice example.
The demo deployed (https://pypoker.herokuapp.com/) seems to work fine, but when I clone and deploy it to heroku myself the table renders, but not the players or chips.
When I check the Heroku log files I see the following:
2020-12-12T14:25:22.502293+00:00 app[api]: Deploy 8a41d489 by user [email protected]
2020-12-12T14:25:22.502293+00:00 app[api]: Release v9 created by user [email protected]
2020-12-12T14:25:22.875487+00:00 heroku[web.1]: Restarting
2020-12-12T14:25:22.877759+00:00 heroku[web.1]: State changed from up to starting
2020-12-12T14:25:24.070090+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2020-12-12T14:25:24.106975+00:00 app[web.1]: [2020-12-12 14:25:24 +0000] [4] [INFO] Handling signal: term
2020-12-12T14:25:24.872322+00:00 app[web.1]: [2020-12-12 14:25:24 +0000] [10] [INFO] Worker exiting (pid: 10)
2020-12-12T14:25:26.547287+00:00 heroku[web.1]: Starting process with command `gunicorn -k flask_sockets.worker client_web:app`
2020-12-12T14:25:29.905665+00:00 app[web.1]: [2020-12-12 14:25:29 +0000] [4] [INFO] Starting gunicorn 20.0.4
2020-12-12T14:25:29.905723+00:00 app[web.1]: [2020-12-12 14:25:29 +0000] [4] [INFO] Listening at: http://0.0.0.0:40769 (4)
2020-12-12T14:25:29.905723+00:00 app[web.1]: [2020-12-12 14:25:29 +0000] [4] [INFO] Using worker: flask_sockets.worker
2020-12-12T14:25:29.910536+00:00 app[web.1]: [2020-12-12 14:25:29 +0000] [9] [INFO] Booting worker with pid: 9
2020-12-12T14:25:29.991277+00:00 app[web.1]: [2020-12-12 14:25:29 +0000] [10] [INFO] Booting worker with pid: 10
2020-12-12T14:25:30.615301+00:00 heroku[web.1]: State changed from starting to up
2020-12-12T14:25:34.000000+00:00 app[api]: Build succeeded
2020-12-12T14:25:43.951326+00:00 app[web.1]: [2020-12-12 14:25:43,950] ERROR in client_web: Unable to connect player 5ca09e09-4717-4633-a838-8b9de59cf14f to a poker5 server: Timed out
2020-12-12T14:25:47.889391+00:00 heroku[router]: at=info method=GET path="/poker/texas-holdem" host=aqueous-hamlet-29943.herokuapp.com request_id=26028165-1786-4ba7-b56e-f3c15ae6a41e fwd="79.67.49.201" dyno=web.1 connect=1ms service=42232ms status=101 bytes=129 protocol=http
2020-12-12T14:25:48.752031+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2020-12-12T14:25:54.149335+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 30 seconds of SIGTERM
2020-12-12T14:25:54.151772+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2020-12-12T14:25:54.165671+00:00 app[web.1]: [2020-12-12 14:25:54 +0000] [4] [INFO] Shutting down: Master
2020-12-12T14:25:54.249050+00:00 heroku[web.1]: Process exited with status 137
2020-12-12T14:25:55.308959+00:00 heroku[router]: at=info method=GET path="/" host=aqueous-hamlet-29943.herokuapp.com request_id=30a88add-116b-4a39-bc88-c420afd3c091 fwd="79.67.49.201" dyno=web.1 connect=0ms service=11ms status=200 bytes=2044 protocol=http
2020-12-12T14:25:55.563438+00:00 heroku[router]: at=info method=GET path="/static/css/bootstrap-slider.min.css" host=aqueous-hamlet-29943.herokuapp.com request_id=c7331882-8c69-4d83-8d1f-644019d52586 fwd="79.67.49.201" dyno=web.1 connect=1ms service=4ms status=200 bytes=7681 protocol=http
2020-12-12T14:25:55.469725+00:00 heroku[router]: at=info method=GET path="/static/css/bootstrap.min.css" host=aqueous-hamlet-29943.herokuapp.com request_id=da5d00a9-700d-4f7e-9689-f932b97ce8a2 fwd="79.67.49.201" dyno=web.1 connect=1ms service=8ms status=200 bytes=97620 protocol=http
2020-12-12T14:25:55.659099+00:00 heroku[router]: at=info method=GET path="/static/js/reconnecting-websocket.min.js" host=aqueous-hamlet-29943.herokuapp.com request_id=cc9cd3d5-4c8e-47b2-8e1d-a36c62c60c9a fwd="79.67.49.201" dyno=web.1 connect=1ms service=2ms status=200 bytes=2082 protocol=http
2020-12-12T14:25:55.561970+00:00 heroku[router]: at=info method=GET path="/static/css/TimeCircles.css" host=aqueous-hamlet-29943.herokuapp.com request_id=d974661e-ef3f-4a7d-8c0a-f3c291e12683 fwd="79.67.49.201" dyno=web.1 connect=0ms service=3ms status=200 bytes=1076 protocol=http
2020-12-12T14:25:55.572153+00:00 heroku[router]: at=info method=GET path="/static/js/jquery-2.0.3.min.js" host=aqueous-hamlet-29943.herokuapp.com request_id=fee333f3-06d7-4492-a954-8baa0ae56d1d fwd="79.67.49.201" dyno=web.1 connect=0ms service=5ms status=200 bytes=83907 protocol=http
2020-12-12T14:25:55.579040+00:00 heroku[router]: at=info method=GET path="/static/css/application.css" host=aqueous-hamlet-29943.herokuapp.com request_id=36645c0a-9968-4c3a-b76f-539a963276ed fwd="79.67.49.201" dyno=web.1 connect=4ms service=14ms status=200 bytes=7443 protocol=http
2020-12-12T14:25:55.578190+00:00 heroku[router]: at=info method=GET path="/static/js/bootstrap-slider.min.js" host=aqueous-hamlet-29943.herokuapp.com request_id=b535bb8c-2aee-4877-91e9-1ca449d3028e fwd="79.67.49.201" dyno=web.1 connect=1ms service=4ms status=200 bytes=30697 protocol=http
2020-12-12T14:25:55.663605+00:00 heroku[router]: at=info method=GET path="/static/js/TimeCircles.js" host=aqueous-hamlet-29943.herokuapp.com request_id=d749d29b-5949-40b1-ba8c-ad950a1d5d5a fwd="79.67.49.201" dyno=web.1 connect=1ms service=4ms status=200 bytes=34086 protocol=http
2020-12-12T14:25:55.675314+00:00 heroku[router]: at=info method=GET path="/static/js/application.js" host=aqueous-hamlet-29943.herokuapp.com request_id=8ae2f266-8ab0-4ed9-80a6-9de6d15b5e82 fwd="79.67.49.201" dyno=web.1 connect=0ms service=3ms status=200 bytes=22706 protocol=http
2020-12-12T14:25:56.230315+00:00 heroku[router]: at=info method=GET path="/poker/texas-holdem" host=aqueous-hamlet-29943.herokuapp.com request_id=d346d900-639a-41a8-96f8-c26a85eb8910 fwd="79.67.49.201" dyno=web.1 connect=1ms service=2ms status=101 bytes=129 protocol=http
2020-12-12T14:26:30.127231+00:00 heroku[router]: at=info method=POST path="/join" host=aqueous-hamlet-29943.herokuapp.com request_id=867fa8aa-9073-4813-886d-51fe84fcc661 fwd="79.67.49.201" dyno=web.1 connect=0ms service=9ms status=302 bytes=599 protocol=http
2020-12-12T14:26:30.230744+00:00 heroku[router]: at=info method=GET path="/" host=aqueous-hamlet-29943.herokuapp.com request_id=b934e242-9c76-4a9c-9234-ab3fde08800d fwd="79.67.49.201" dyno=web.1 connect=0ms service=10ms status=200 bytes=3125 protocol=http
2020-12-12T14:21:37.000000+00:00 app[heroku-redis]: source=REDIS addon=redis-encircled-80148 sample#active-connections=1 sample#load-avg-1m=0.21 sample#load-avg-5m=0.245 sample#load-avg-15m=0.265 sample#read-iops=0 sample#write-iops=0.058333 sample#memory-total=15664240kB sample#memory-free=11431788kB sample#memory-cached=1415360kB sample#memory-redis=330128bytes sample#hit-rate=1 sample#evicted-keys=0
Is the version on git the same as the one deployed in your working example?
Any ideas as to what the issue could be, and how to fix it?
Thanks
I am trying to run this program and play, and I found that once I enter the wrong room number, I cannot exit the room normally. So a button may be needed to exit the room
Just found this repo, wondering if it's still alive, and if so, how to get it running??????
I have my redis server running, set the env variable for the URL, and when I start the holdem server, it just says the server is "running", no port or anything. I try localhost:5000 for default flask apps but no dice.
A simple how-to would go a long way for us newbies! Thanks!
contact info of the repo owner, I need some help.
players pseudo-randomly lends either on one server or another based on a load balancer decision.
there should be a centralised service (redis pubsub or a database) to decoupled request handlers (flask web-socket) and servers. players should be able to see the complete list of available poker servers and choose which one they want to connect to.
Hi,
While running with Python3 environment i am getting Connection Timed out, what changes do we need to make to run with python3, i can help with this
I am keen to use this nice web-app for a Christmas game with friends, but would also like to remove the bet timeouts, so that people aren't rushed.
I've extended the timeout, but now get h15 errors:
at=error code=H15 desc="Idle connection" method=GET path="/poker/texas-holdem"
due to the heroku 55 second timeout window ( see https://devcenter.heroku.com/articles/http-routing#timeouts)
Would it be possible to include a feature to ping the connection and keep it open if the bet-timeout is extended beyond the 55 heroku timeout limit?
Hi there,
Am trying to install this software on my machine, and have managed to work my way past several installation hurdles. I have run into the following error though:
Traceback (most recent call last): File "texasholdem_poker_service.py", line 21, in <module> mongo_db = pymongo.MongoClient(mongo_url).get_default_database() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pymongo/mongo_client.py", line 1742, in get_default_database raise ConfigurationError('No default database defined') pymongo.errors.ConfigurationError: No default database defined
I've never used Mongo before โ how do I "define" what the default database should be? Do I already have a default database? I've been searching on the web but as a newb to this particular software, I'm not entirely sure what to search for. Any help would be greatly appreciated.
Python 3.11, Flask==2.2.2, Windows 10
After firing up the server and joining a room, get this error in the server log:
127.0.0.1 - - [19/Nov/2022 03:04:13] "GET /poker/texas-holdem HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\serving.py", line 335, in run_wsgi
execute(self.server.app)
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\serving.py", line 322, in execute
application_iter = app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 2548, in __call__
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask_sockets.py", line 40, in __call__
handler, values = adapter.match()
^^^^^^^^^^^^^^^
File "C:\Users\chalu\AppData\Local\Programs\Python\Python311\Lib\site-packages\werkzeug\routing\map.py", line 622, in match
raise WebsocketMismatch() from None
werkzeug.routing.exceptions.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.