nandilugio / typetrain

Command line tool to practice touch typing.
0 stars 0 forks source link

Crash after finishing a particular paragraph exercise in file #3

Open nandilugio opened 4 months ago

nandilugio commented 4 months ago
❯ python main.py --skip 37 file momentos_estelares_de_la_probabilidad_y_estadistica.txt
Traceback (most recent call last):
  File "/Users/nando/Projects/personal/typetrain/main.py", line 157, in curses_app
    stats = run_paragraph_exercise(win, paragraph)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nando/Projects/personal/typetrain/main.py", line 141, in run_paragraph_exercise
    win.addstr(f'\n\n{render_stats_as_list(stats)}\n')
_curses.error: addwstr() returned ERR

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/nando/Projects/personal/typetrain/main.py", line 204, in <module>
    main()
  File "/Users/nando/Projects/personal/typetrain/main.py", line 194, in main
    aggregate_stats = curses.wrapper(curses_app, selected_plugin, skip=args.skip)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nando/.pyenv/versions/3.11.8/lib/python3.11/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nando/Projects/personal/typetrain/main.py", line 180, in curses_app
    return aggregate_stats
           ^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'aggregate_stats' where it is not associated with a value

momentos_estelares_de_la_probabilidad_y_estadistica.txt

nandilugio commented 4 months ago

code at 70db555

nandilugio commented 4 months ago

maybe related. long paragraph so not tested more but, last character was typed wrongly both times, I think '/' instead of '.'.