Moderator: Moderators
WhiteRider wrote:I guess you're not getting hands imported after you bust, so PT3 has no info about the players after that.
Or are you using a data-miner?
If you are using a datamining app then the seating information may not correct itself after you leave.
WhiteRider wrote: Do the hand histories include the correct seating information?
Stage #1401851050 Tourney ID 1966235 Holdem Single Tournament No Limit $20 - 2009-01-10 17:13:37 (ET)
Table: 26188660 (Real Money) Seat #1 is the dealer
Seat 1 - JEPOPI ($1500 in chips)
Seat 2 - MOXMAN13 ($1500 in chips)
Seat 3 - FEINT006 ($1500 in chips)
Seat 4 - LETSDOIT222 ($1500 in chips)
Seat 5 - CHOADDILLY ($1500 in chips)
Seat 6 - TBONE4LIFE04 ($1500 in chips)
MOXMAN13 - Posts small blind $10
FEINT006 - Posts big blind $20
*** POCKET CARDS ***
Dealt to FEINT006 [8d 5c]
LETSDOIT222 - Raises $40 to $40
CHOADDILLY - Calls $40
TBONE4LIFE04 - Folds
JEPOPI - Folds
MOXMAN13 - Calls $30
FEINT006 - Folds
*** FLOP *** [Qs 7s 5h]
MOXMAN13 - Checks
LETSDOIT222 - Checks
CHOADDILLY - Checks
*** TURN *** [Qs 7s 5h] [7h]
MOXMAN13 - Checks
LETSDOIT222 - Bets $20
CHOADDILLY - Folds
MOXMAN13 - Folds
LETSDOIT222 - returned ($20) : not called
*** SHOW DOWN ***
LETSDOIT222 - Does not show
LETSDOIT222 Collects $140 from main pot
*** SUMMARY ***
Total Pot($140)
Board [Qs 7s 5h 7h]
Seat 1: JEPOPI (dealer) Folded on the POCKET CARDS
Seat 2: MOXMAN13 (small blind) Folded on the TURN
Seat 3: FEINT006 (big blind) Folded on the POCKET CARDS
Seat 4: LETSDOIT222 collected Total ($140) HI:($140) [Does not show]
Seat 5: CHOADDILLY Folded on the TURN
Seat 6: TBONE4LIFE04 Folded on the POCKET CARDS
Stage #1401851050 Tourney ID 1966235 Holdem Single Tournament No Limit $20 - 2009-01-10 17:13:37 (ET)
Table: 26188660 (Real Money) Seat #1 is the dealer
Seat 1 - JEPOPI ($1500 in chips)
Seat 2 - MOXMAN13 ($1500 in chips)
Seat 3 - FEINT006 ($1500 in chips)
Seat 4 - LETSDOIT222 ($1500 in chips)
Seat 5 - CHOADDILLY ($1500 in chips)
Seat 6 - TBONE4LIFE04 ($1500 in chips)
MOXMAN13 - Posts small blind $10
FEINT006 - Posts big blind $20
*** POCKET CARDS ***
Dealt to FEINT006 [8d 5c]
LETSDOIT222 - Raises $40 to $40
CHOADDILLY - Calls $40
TBONE4LIFE04 - Folds
JEPOPI - Folds
MOXMAN13 - Calls $30
FEINT006 - Folds
*** FLOP *** [Qs 7s 5h]
MOXMAN13 - Checks
LETSDOIT222 - Checks
CHOADDILLY - Checks
*** TURN *** [Qs 7s 5h] [7h]
MOXMAN13 - Checks
LETSDOIT222 - Bets $20
CHOADDILLY - Folds
MOXMAN13 - Folds
LETSDOIT222 - returned ($20) : not called
*** SHOW DOWN ***
LETSDOIT222 - Does not show
LETSDOIT222 Collects $140 from main pot
*** SUMMARY ***
Total Pot($140)
Board [Qs 7s 5h 7h]
Seat 1: JEPOPI (dealer) Folded on the POCKET CARDS
Seat 2: MOXMAN13 (small blind) Folded on the TURN
Seat 3: FEINT006 (big blind) Folded on the POCKET CARDS
Seat 4: LETSDOIT222 collected Total ($140) HI:($140) [Does not show]
Seat 5: CHOADDILLY Folded on the TURN
Seat 6: TBONE4LIFE04 Folded on the POCKET CARDS
Stage #1401879173 Tourney ID 1966235 Holdem Single Tournament No Limit $300 - 2009-01-10 17:30:25 (ET)
Table: 26188660 (Real Money) Seat #2 is the dealer
Seat 1 - JEPOPI ($2000 in chips)
Seat 2 - MOXMAN13 ($2075 in chips)
Seat 5 - CHOADDILLY ($2745 in chips)
Seat 6 - TBONE4LIFE04 ($2180 in chips)
CHOADDILLY - Posts small blind $150
TBONE4LIFE04 - Posts big blind $300
*** POCKET CARDS ***
JEPOPI - Folds
MOXMAN13 - Folds
CHOADDILLY - Calls $150
TBONE4LIFE04 - Checks
*** FLOP *** [Qd Js As]
CHOADDILLY - Checks
TBONE4LIFE04 - Bets $300
CHOADDILLY - Folds
TBONE4LIFE04 - returned ($300) : not called
*** SHOW DOWN ***
TBONE4LIFE04 - Does not show
TBONE4LIFE04 Collects $600 from main pot
*** SUMMARY ***
Total Pot($600)
Board [Qd Js As]
Seat 1: JEPOPI Folded on the POCKET CARDS
Seat 2: MOXMAN13 (dealer) Folded on the POCKET CARDS
Seat 5: CHOADDILLY (small blind) Folded on the FLOP
Seat 6: TBONE4LIFE04 (big blind) collected Total ($600) HI:($600) [Does not show]
Whiterider wrote:Is this a script you wrote?
#ub_mine.py v1.1 Nov 29 2008
#written by Neko (2+2 handle)
#This code is released under the WTF licence. That means you can
#do W.hatever T.he F.uck you feel like with it.
#If you would like to make a small donation via UB or Absolute p.m. me on 2+2
#or email me [email protected]
import os,shutil,sys,string,time,traceback
from msvcrt import kbhit,getch
#maximum number of hands to store in one batch file
max_hands_per_file = 100
#if True converted .dat files will be deleted otherwise they will be moved
del_converted = True
#list of locations to look for UB instant replay data files
replay_dirs = ["C:\Program Files\UltimateBet\InstantReplay",
"C:\Poker Application\UltimateBet\InstantReplay"]
#move instant replay files to this directory after processing
root_dir = os.getcwd()
converted_dir = root_dir+"/converted/"
#store the converted histories in this directory
hist_dir = root_dir+"/histories/"
#number of seconds to wait in between processing batches
sleep_time = 5
#===============================================================================
def main():
replay_dir = get_replay_dir(replay_dirs)
if not replay_dir:
die("Unable to find the instant replay directory")
#make directory to move processed hands to if it doesn't already exist
print "Looking for processed hand directory "+converted_dir
if not os.path.isdir(converted_dir):
"\tConverted directory not found. Trying to create now...",
try:
os.mkdir(converted_dir)
except:
die("failed")
else:
print "success"
else:
print "\tAlready exists"
#make directory to store converted hand history file
if not os.path.isdir(hist_dir):
try:
os.mkdir(hist_dir)
except:
die("failed to make hand history directory")
stop = False
print "="*80
print "Starting to convert hand histories"
print "hit 'q' at any time to stop import"
print "="*80
ttl_hand_count = 0
hand_counter=0
out_file = None
os.chdir(replay_dir)
while not stop:
if kbhit() and getch() == 'q': stop = True
dirList=os.listdir(os.getcwd())
for fname in dirList:
if fname.find('.dat')!=-1:
#get a new file to write to if the old one already contains
#the max num of histories or an output file doesn't yet exist
if hand_counter == max_hands_per_file or not out_file:
hand_counter = 0
if isinstance(out_file,file):
out_file.close()
out_file = get_new_file_object()
#extrat history and move/delete the .dat file
if add_to_file(out_file,fname):
handle_converted_file(fname)
hand_counter += 1
ttl_hand_count += 1
sys.stdout.write("\rTotal Hands Written: " + str(ttl_hand_count))
sys.stdout.flush()
if not stop: time.sleep(sleep_time)
if out_file:
out_file.close()
raw_input("\nSuccesfully Finished Execution. Press enter key to quit.")
#-------------------------------------------------------------------------------
#Extract the hh from the .dat file
def add_to_file(f,fname):
try:
infile = open(fname,'r')
dat = infile.readlines()
for i,line in enumerate(dat):
dat[i] = dat[i].strip()
infile.close()
first = dat.index("[IHH]")
dat = dat[first+1:len(dat)-1]
hh = ''
for line in dat:
nxt_line = line.partition('=')[2]
hh += nxt_line+'\n'
f.write(hh)
f.flush()
except:
return False
return True
#-------------------------------------------------------------------------------
#remove or delete the converted .dat files
def handle_converted_file(fname):
if del_converted:
os.remove(fname)
else:
# removing duplicate file if file exists
pathToFile = converted_dir+fname
if os.path.exists(pathToFile):
os.remove(pathToFile)
shutil.move(fname,converted_dir)
#-------------------------------------------------------------------------------
#iterate over the list of replay directories and return the first one that exists
def get_replay_dir(dirs):
idx = 0
print "Looking for Instant Replay directory...."
for rdir in dirs:
print "\tChecking "+rdir,
if os.path.isdir(rdir):
print "found"
return rdir
else:
print "doesn't exist"
return False
#-------------------------------------------------------------------------------
#generic exit point on errors
def die(msg = None):
if msg: print msg
raw_input("Press enter key to exit")
os._exit(99)
#-------------------------------------------------------------------------------
#returns the next batch file name
def get_output_file_name():
suf = get_file_suffix()
num=suf.next()
while os.path.exists(hist_dir+"batch_"+str(num)+'.txt'):
num = suf.next()
return hist_dir+"batch_"+str(num)+'.txt'
#-------------------------------------------------------------------------------
#batch file suffix generator
def get_file_suffix():
k = 0
while True:
k+=1
yield k
#-------------------------------------------------------------------------------
#returns a new file object to write a batch of histories to
def get_new_file_object():
try:
out_file = open(get_output_file_name(),'w')
return out_file
except:
die("Unable to create new output file "+fname)
#===============================================================================
if __name__ == '__main__':
try:
main()
except:
print ""
print "An unhandled exception occured."
traceback.print_exc()
raw_input("press enter key to exit")
WhiteRider wrote:It might be better to change (or get changed) the way that seating information is written by the script.
Return to Technical Support / Bug Reports [Read Only]
Users browsing this forum: No registered users and 0 guests