# Troubleshooting tsh

What to do when things go wrong with tsh.

Updated 2018-04-07T09:35:00+05 for tsh 3.330.

## Installation

It's possible that some OS/X browsers may download a non-executable version of this file. If so, please contact me for instructions. If you can't reach me, move your tsh folder to your home directory, open a “Terminal” window, enter the command “`cd tsh-nnnn`” replacing “`nnnn`” with the version number that you downloaded, and finally enter the command “`chmod a+x osx*`” to mark the command executable.

Some security-conscious users may have their personal firewall settings set too aggressively to allow the “`update`” command to function. tsh uses only port 80 (the standard port for HTTP service), so it should suffice to add tsh and/or Perl to the list of applications authorized to connect to this service.

If your update command does not seem to work, try the following in order. You may have a corrupt manifest file: move the ‘MANIFEST.txt’ file out of the tsh folder to make tsh lose track of what files it has, rerun tsh and the update. You may be having networking problems: make sure your browser can connect to the tsh web site. You may be having local system resource problems preventing tsh from beginning the update process: try restarting your Windows machine. You may have encountered a problem I didn't expect: download a fresh ZIP archive of either the current development release or the last stable release from the tsh web site, then copy your event folders into it.

## Correcting Tournament Data

You can delete bad pairings using the “`UnPairRound`” command, edit scores (and correct who went first, etc.) using the “`EditScore`” command (if you are in the middle of adding scores and you want to correct the most recently entered game, just type “es” at the game score prompt) and delete bad scores using the “`DELETEscore`” command. See the command reference for the syntax of those commands.

If you have made a serious error, you can manually revert to an earlier version of any tournament data (“.t”) file. tsh journals a copy of the tournament data file into a subdirectory or folder named "old" after each major change. Quit out of tsh, then look for the last good data file (either by checking the timestamps or inspecting the contents of the files), rename the bad “.t” file to “.t.bad” and put a copy of the journalled “.t.lotsofnumbers” file in its place as a new “.t” file.

You can also edit “.t” files using a text editor such as vim, gVim, BBEdit, TextEdit, NotePad, WordPad or emacs. If you do so, first quit from tsh, because tsh keeps an internal copy of its data that will overwrite any changes you make when tsh next updates its files.

## Crashes

If you are testing a new tsh feature, it’s possible that a program bug may put tsh into an infinite loop or dump core. In the former case, when tsh doesn’t give you a prompt, you’ll have to interrupt tsh and restart it. In OS/X and Unix, you interrupt terminal processes by pressing Control-C. In Windows, you can close the window that tsh is running in.

Some early versions of some pairings commands took a very long time to run. It’s possible that some bugs remain undiscovered. If you find that generating pairings in one particular situation takes excessively long (more than a few seconds), you may interrupt tsh, restart it, and then manually enter a faster pairing command. Allowing an extra repeat should in most cases substantially speed up the pairings calculations, or you can use the “`PAIR`” command to manually pair key players and then a regular command to pair the rest. In any case, in the unlikely event that this happens to you, please e-mail John a copy of the “.t” file involved.

As mentioned above, tsh journals its data after each major command, so if you are unsure about the condition of its files after a crash, revert to the last versions that were saved before the crash.

## Players Who Miss Games

If a player misses a paired game (e.g. due to illness or tardiness), you should manually repair him and his opponent to assign them both byes, then enter appropriate spreads for their scores. If you don’t do this, the unplayed game will count for ratings, and some players may end up getting multiple byes before others get any. If players 1 and 2 in division A were supposed to play each other in round 3 but player 1 didn’t show up, then enter “`floss a 1 3`”.

If a player gives you notice that he will be missing one or more games, or you end up determining that he is a no-show after the tournament has begun, you can prevent them from being considered for pairings using the “`EditScore`” command. If player 4 in division A should no longer be paired, enter “`es a 4 0`” to begin editing the player's scoresheet, then enter “`off -50`” give them forfeit losses whenever pairings are computed. (“`off 50`” will give them a 50-point bye, and “`off 0`” will record a missed game without assigning a win or loss). If the player subsequently returns to the tournament, you can re-enable their pairings by entering “`on`” while editing their scorecard.

## Errors and Informational Messages

If you aren't sure what an error message means, look to see if it has a code in [square brackets] at its end. If so, use the “`HUH`” command to ask for an explanation. If not, contact John and ask him to add an explanation.

## If All Else Fails...

My phone number is +1 416 876 7675, and I am more often in Canada’s Eastern time zone than not (UTC-4 or -5 depending on the time of year). If you arrange with me beforehand, I’ll make sure that I’m easily reachable at that number during your tournament; if not, I’ll find someone else who can be reached. If you didn’t prearrange my availability and you’re reading this because something has just gone unexpectedly wrong during a tournament, please try calling me anyway. I am also reachable when online by email, Facebook Messenger, Google Hangout and (by prearrangement) LINE, Skype or WhatsApp.

Whether or not you reach me right away, when you have an Internet connection please use the “`BUGreport`” command to send diagnostic information about any problems that you may encounter, so that I can fix it promptly.