charlestudor / PokerNowLogConverter

A simple CLI tool for converting logs from Poker Now games to the PokerStars format.
MIT License
12 stars 3 forks source link

Error installing #3

Closed sabman83 closed 2 years ago

sabman83 commented 2 years ago

Thanks for working on this! Is this working or is it too early to use this? I had some issues installing it. I could go into more detail.

charlestudor commented 2 years ago

Hey! Please do go into more detail about what went wrong installing, I want to get it working properly for everyone ASAP!

sabman83 commented 2 years ago

I got the installation right (I think) by upgrading to python3. Here's what I encountered when trying to run on a file:

python3 PokerNowLogConverter/src/poker_now_log_converter/main.py -H sadwoman -f ~/Downloads/poker_now_log_E3m-mcO4O8VG4lY-aDAomm8qU.csv
Poker Now Log Converter Started...
No currency specified. Using USD
No timezone specified. Using ET
Attempting to load file: "/Users/saby/Downloads/poker_now_log_E3m-mcO4O8VG4lY-aDAomm8qU.csv"
Traceback (most recent call last):
  File "PokerNowLogConverter/src/poker_now_log_converter/main.py", line 302, in <module>
    main()
  File "PokerNowLogConverter/src/poker_now_log_converter/main.py", line 263, in main
    parsed_game = parse_file(file, currency=currency, timezone=timezone)
  File "PokerNowLogConverter/src/poker_now_log_converter/main.py", line 35, in parse_file
    game = Game(poker_now_log=lines, currency=currency, timezone=timezone, original_filename=filepath)
  File "/Users/saby/PokerNowLogConverter/PokerNowLogConverter/src/poker_now_log_converter/game.py", line 273, in __init__
    stack_size = int(player.split("\" (")[1].split(")")[0])
ValueError: invalid literal for int() with base 10: '150.00'
charlestudor commented 2 years ago

Thanks for the extra information! I'll make it more clearer in the readme that it only works on Python3.

I've just added a new release v0.0.4 which should fix the issue you're experiencing. Please let me know how you get on. (And if the log it outputs works like you were expecting)

sabman83 commented 2 years ago

Thanks! It seems to have worked now. I tried importing it into PT4 and it seems to have created new entries instead of overwriting the previous entries. Do you change the IDs of the hands? How do you deal with the id of a hand? (I used the pn2ps to import)

Also I saw these messages in the log. Do the "States no considered" mean they are not imported?

Poker Now Log Converter Started...
No currency specified. Using USD
No timezone specified. Using ET
Attempting to load file: "/Users/saby/Downloads/poker_now_log_IkHKo_yltmqraqTXLCA9vbesl.csv"
State not considered: WARNING: the admin queued the stack change for the player "chlo @ 9yKhTyKfO7" reseting to 200.00 chips in the next hand.
State not considered: The admin updated the player "chlo @ 9yKhTyKfO7" stack from 2.00 to 200.00.
State not considered: WARNING: the admin queued the stack change for the player "Bart @ VOj5BSumyS" adding 100.00 chips in the next hand.
State not considered: The admin updated the player "Bart @ VOj5BSumyS" stack from 112.37 to 212.37.
State not considered: WARNING: the admin queued the stack change for the player "Tara6 @ RlCE4sDLwP" adding 100.00 chips in the next hand.
State not considered: The admin updated the player "Tara6 @ RlCE4sDLwP" stack from 85.50 to 185.50.
State not considered: Remaining players decide whether to run it twice.
State not considered: "Bart @ VOj5BSumyS" chooses to  run it twice.
State not considered: "SuitedAces @ AlQVnMfr-m" chooses to not run it twice.
State not considered: Some players choose to not run it twice.
State not considered: Remaining players decide whether to run it twice.
State not considered: "Bart @ VOj5BSumyS" chooses to  run it twice.
State not considered: "Tara6 @ RlCE4sDLwP" chooses to  run it twice.
State not considered: All players in hand choose to run it twice.
State not considered: flop (second run):  [6♦, 3♣, A♠]
State not considered: turn (second run): 6♦, 3♣, A♠ [7♣]
State not considered: river (second run): 6♦, 3♣, A♠, 7♣ [6♠]
State not considered: The player "Bart @ VOj5BSumyS" passed the room ownership to "Tara6 @ RlCE4sDLwP".
charlestudor commented 2 years ago

The warnings about stack size changes are fine those hands should have imported correctly. I'll update the list of warnings.

The games where people ran it twice currently won't have imported correctly. I've been meaning to fix this but needed to get a hold of a pokerstars log to see how they output it. Will fix it soon.

You're right currently the hands use a random number each time they are generated, I could make this based on the file name and hand number so it's consistent instead.

Cheers!

On Mon, 24 Jan 2022, 22:46 Sebastin Kolman, @.***> wrote:

Thanks! It seems to have worked now. I tried importing it into PT4 and it seems to have created new entries instead of overwriting the previous entries. Do you change the IDs of the hands? How do you deal with the id of a hand? (I used the pn2ps to import)

Also I saw these messages in the log. Do the "States no considered" mean they are not imported?

Poker Now Log Converter Started...

No currency specified. Using USD

No timezone specified. Using ET

Attempting to load file: "/Users/saby/Downloads/poker_now_log_IkHKo_yltmqraqTXLCA9vbesl.csv"

State not considered: WARNING: the admin queued the stack change for the player "chlo @ 9yKhTyKfO7" reseting to 200.00 chips in the next hand.

State not considered: The admin updated the player "chlo @ 9yKhTyKfO7" stack from 2.00 to 200.00.

State not considered: WARNING: the admin queued the stack change for the player "Bart @ VOj5BSumyS" adding 100.00 chips in the next hand.

State not considered: The admin updated the player "Bart @ VOj5BSumyS" stack from 112.37 to 212.37.

State not considered: WARNING: the admin queued the stack change for the player "Tara6 @ RlCE4sDLwP" adding 100.00 chips in the next hand.

State not considered: The admin updated the player "Tara6 @ RlCE4sDLwP" stack from 85.50 to 185.50.

State not considered: Remaining players decide whether to run it twice.

State not considered: "Bart @ VOj5BSumyS" chooses to run it twice.

State not considered: "SuitedAces @ AlQVnMfr-m" chooses to not run it twice.

State not considered: Some players choose to not run it twice.

State not considered: Remaining players decide whether to run it twice.

State not considered: "Bart @ VOj5BSumyS" chooses to run it twice.

State not considered: "Tara6 @ RlCE4sDLwP" chooses to run it twice.

State not considered: All players in hand choose to run it twice.

State not considered: flop (second run): [6♦, 3♣, A♠]

State not considered: turn (second run): 6♦, 3♣, A♠ [7♣]

State not considered: river (second run): 6♦, 3♣, A♠, 7♣ [6♠]

State not considered: The player "Bart @ VOj5BSumyS" passed the room ownership to "Tara6 @ RlCE4sDLwP".

— Reply to this email directly, view it on GitHub https://github.com/charlestudor/PokerNowLogConverter/issues/3#issuecomment-1020625932, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS3SRATKXLI6P4TRCYCBWTUXXJD7ANCNFSM5MS6P5XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

sabman83 commented 2 years ago

Cool! Yeah, the run it twice is the biggest hurdle. And it's not easy to reverse engineer the pokerstars format. Thanks for taking the effort!

Why did you choose the PS format? How do you plan to use this tool?

charlestudor commented 2 years ago

Great thanks!

I currently play quite a few games through pokernow and just wanted the ability to analyse my games / winnings in PT4. Pokerstars format was the simplest to get up and running with, but I'd like to add support for openhh format in case people want to use it for other purposes.

On Mon, 24 Jan 2022, 23:10 Sebastin Kolman, @.***> wrote:

Cool! Yeah, the run it twice is the biggest hurdle. And it's not easy to reverse engineer the pokerstars format. What did you choose the PS format? How do you plan to use this tool?

— Reply to this email directly, view it on GitHub https://github.com/charlestudor/PokerNowLogConverter/issues/3#issuecomment-1020641870, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS3SRASBQP5DDMVNR4USFDUXXL6BANCNFSM5MS6P5XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

sabman83 commented 2 years ago

Yeah, I was going to suggest that. Maybe that's easier for run it twice hands.

charlestudor commented 2 years ago

The new version v0.0.5 should support run it twice hands. Needs some more testing in earnest so please let me know if it works / is broken if you end up using it. Thanks for the help!