Troubleshooting tsh

What to do when things go wrong with tsh.

Updated 2025-05-31T12:00:00+00 for tsh 3.340.

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 ports 80 and 443 (the standard port for HTTP and HTTPS 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.

Web Server Issues

If you are using the mirror-ftp command to offer remote access to your tournament reports (including the scoreboard), you may run into the following issues.

Remote server does not update: Check the mirror-ftp command window for error messages. If they indicate a connectivity issue, make sure you have a network connection to your server, and try running a separate FTP client (such as FileZilla or command-line FTP). Also check your operating system’s security settings to make sure that this command has permission to create a network connection to an FTP server. If there is an authentication issue, make sure that you have specified the correct username and password for your server.

Remote server stops updating: This usually indicates that you have lost your Internet connection.

Some files are missing from remote server: You probably uploaded the file, then deleted it, but didn’t delete the local flag file indicating that it had been sent. Or maybe the upload failed in an unexpected way. Delete the flag file and watch the mirror-ftp log to see what happens. If no file transfers begin, you may not have generated the reports that you thought you did; try rerunning the report commands. If it’s just the photos and there is a chance that you accidentally deleted your local copies, quit and rerun tsh to restore them.

Reports appear poorly formatted: The tsh.css stylesheet file is missing from the server. Delete its flag file and watch the mirror-ftp log.

The index file still shows deleted files: If you manually delete reports, the index file will not be updated until the next time you update a report. Try running the ROSTERS command to create a roster report and update the index file.

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.

Many of the more complicated commands log optional debugging information to the console, as controlled by the DEBUG command. You can also evaluate arbitary Perl code using the EVAL command.

If All Else Fails...

If you’re not sure which manual section has the answer you’re looking for, make sure you are looking at the full manual and not an individual section, then do an in-page search for appropriate keywords.

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 Chat and (by prearrangement) LINE, Skype, Teams, WhatsApp, or Zoom.

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.