kraanzu/smassh

[BUG] Crashes when the "cursor buddy" beats you...

samuelj123 opened this issue ยท 11 comments

Describe the bug ๐Ÿ›

If the "cursor buddy" finishes the typing before I do, it crashes and throws up a whole bunch of errors.

To Reproduce ๐Ÿฃ

  1. Get on Ubuntu on WSL, install smassh using pip
  2. Go to "settings", find "cursor buddy" pull his speed to 50. (or more, if you're faster than me)
  3. Race against the cursor, Lose.

Expected behavior ๐Ÿค”

It crashes...

Screenshots ๐Ÿง

image

Your operating system name

Ubuntu on WSL

Your operating system version

No response

Additional context ๐Ÿ“

No response

Damn.. Cursor buddy be doing some real damage there lol
I'm a little busy now. I'll push a fix tomm morning :)

Thanks for trying out Smassh <3

Hey @samuelj123, I cannot reproduce this behavior (although cursor buddy vanishes) for both time and word mode.
Can you share your config file with me?

python -c "import appdirs; print(appdirs.user_config_dir('smassh'))"

You can run the above command to get the location of the config dir. Inside which, will be a file called smassh.json

Just adding to avoid any confusion, the commit (before my comment), doesn't fix this issue, I mistakenly wrote 78 instead of 75

Sorry for the delay...
Here's the contents of smassh.json

{
  "data": [
    {
      "mode": "words",
      "count": 30,
      "start_time": 1707189131.3083422,
      "elapsed_time": 23.058086156845093,
      "wpm": 75,
      "raw_wpm": 75,
      "accuracy": 100,
      "failed": false
    },
    {
      "mode": "words",
      "count": 30,
      "start_time": 1707189241.9093516,
      "elapsed_time": 23.416937112808228,
      "wpm": 13,
      "raw_wpm": 74,
      "accuracy": 18,
      "failed": false
    },
    {
      "mode": "words",
      "count": 30,
      "start_time": 1707189586.3821304,
      "elapsed_time": 22.5915789604187,
      "wpm": 74,
      "raw_wpm": 77,
      "accuracy": 96,
      "failed": false
    },
    {
      "mode": "words",
      "count": 30,
      "start_time": 1707190641.2839632,
      "elapsed_time": 24.710692167282104,
      "wpm": 69,
      "raw_wpm": 70,
      "accuracy": 98,
      "failed": false
    }
  ]
}

Hey @samuelj123! My comment was incorrect. I updated the command :)

Hey @kraanzu , so technically all I need to do is just run pip install --upgrade smassh for it to work right? Or should I wait for 3.2.0 to be available on pip? I right now seem to have 3.0.4 ... Sorry! New to all this

Ah no I meant the command in the previous comment I made. The text file which you just share is the log data and not the config
Here's how you can get the config:

python -c "import appdirs; print(appdirs.user_config_dir('smassh'))"

Ah! Right

{
  "difficulty": "normal",
  "blind_mode": false,
  "min_speed": 0,
  "min_accuracy": 0,
  "min_burst": 0,
  "force_correct": false,
  "confidence_mode": "off",
  "capitalization_mode": "off",
  "cursor_buddy_speed": 30,
  "tab_reset": "on",
  "language": "english",
  "numbers": false,
  "punctuations": false,
  "mode": "words",
  "words_count": 30,
  "time_count": 30,
  "caret_style": "block",
  "writing mode": "words",
  "theme": "dracula"
}

Awesome! I'll check it out

Edit: Ok I can confirm that its crashing!

Did we solve your problem?

Glad we could help!
Don't forget to star the repository!
โ€“ @kraanzu

Yep!! All fixed! Starring away