Banish The "Error Reading Train Database File" Message
by Yuri Sos


Don't you just hate this message?

It usually doesn't interfere with running MSTS, and you can click "Yes" to continue (so it's generally a non-fatal error), but every time you start or stop an activity or open the Activity Editor you're confronted with this message. The activities that use this item of rolling stock usually can't be run either.

I get 2-3 emails a week asking me where this error came from and how to get rid of it.

The glib one-line answer is "this error message means that there is a consist asking for a non-existent piece of rollingstock."

Well, that's really helpful isn't it?

I'm going to show you how to track down and eliminate these errors using Mike Simpson's incredible Swiss-Army knife fix-everything program, Route Riter (versions 7.0.50 or higher)..


Getting Started

Open Route_Riter (v7.0.50 or higher).

Now the very first thing you should do is click the buttons indicated below in sequence. Route_Riter will then check and adjust the case on all your consists and WAG files to make sure they all appear correctly in the sim. Windows XP SP2 and higher is now very finicky about the case of the files: Just click the buttons 1-5 and you've sorted all your case errors. This might take some time, depending on the size of your MSTS Trainset folder.

Route Riter - Select Quick Consist Check

Once that's done, click on the Activities/Stock tab (arrow #1 in the image below).
Click on the Quick consist check button (arrow #2 in the image below).

Route Riter - Select Quick Consist Check

Route_Riter will quickly check all the consist and then present you with a screen that looks like this:

Quick Consist Result Grid

What may not be immediately apparent is that there are three screens, screen #3 above - the "Consists and Associated Rolling Stock" screen - usually covering the other two (#1 being the main Route_Riter screen, #2 the Report Screen). This top screen is an Excel-like grid showing all the consists with their component items of rolling stock. The columns can be sorted by clicking on the column header.

The bottom window of this screen displays names of consists with missing items of rollingstock.

The other screen (smaller and thus initially hidden underneath) is a typical Route_Riter report screen (#2 above) which looks something like this:

Quick Consist Report Screen

As you can see,there are other errors apart from missing rolling stock - errors such as misplaced rolling stock and typographical errors. Now that we have the Route_Riter reports, we can quickly and simply repair the three types of errors (misplaced, missing, typos) in the Consists. Let's look at each one in turn.


Misplaced items of Rolling Stock

Route Riter v7.0.52 or newer now checks the consists as it populates the display grid. If it finds a consist where the ENG or WAG file exists but is in the wrong folder, it presents you with the following screen, offering to repair the error automatically:

Replace Rolling Stock Dialogue Box

Answer Yes/No and it continues checking the consists. When it finishes checking the consist the Report Screen reflects the repairs that have already been undertaken.

Quick Consist Report Screen


MISSING items of Rolling Stock

On the Report Screen, a typical error message has the format:

"Missing - Folder_Name\filename.wag (or .eng) From Consist_filename.con".

This means that Route_Riter has been unable to find a filename.wag (or.eng) ANYWHERE on your system and that either the folder or the WAG or both are absent from your MSTS installation.

In the report above, an example is "Missing - AU_sarPass\GBV.wag From AU_sar526_5car.con".

Translating this message: Route_Riter has been unable to find the "GBV" item of rolling stock ANYWHERE on your system and that either the folder or the WAG or both are absent from your MSTS installation.

To quote Bob the Builder "Can we fix it? YES WE CAN!"

Go back to the "Consists and Associated Rolling Stock" screen. Missing Items are shown in their own box with the name of the Consist and the ENG or WAG file name in Cyan, thus:


You now need to find the consist in the upper window: you can either scroll through the list or use the Search box at lower right. Enter the filename in whole or part (even if not at beginning of filename, eg 526 will find 526tender, sar526engine, etc), and press "Enter". To search for next file click "Next" or press "F3". Case of search string doesn't matter.

When you find the missing shape, it will be highlighted in red (unless the indicator bar is covering the item you are looking for - simply move it down and you will see the item in red):


If you click on "Change Sheet Format", it's easier to see the component parts of the consist you're looking at:


Left-click to select, then right-click once on the item highlighted in red - AU_sarPass\GBV.wag in the example above - and after a few seconds a "Replace Rolling Stock Item" screen appears. I immediately click on "Path" to sort the folders and scroll down to the folder I need and select the carriage I want to use instead of the missing "GBV".

Replace Rolling Stock Screen

  1. Click on the item of rolling stock you wish to use;
  2. (Optional) Check the box to change any instances of GBV to the one we've selected;
  3. Click "Ok".
  4. A message appears saying "Modified Consist Activated";
  5. Click "Exit" to close this screen.

Now when you return to the "Consists and Associated Rolling Stock" screen, you will see that the corrected wagon is highlighted in Green.

Corrected Consist

Note that the corrected ENG/WAG file appears on this screen at the top of the rolling stock list for that consist: don't worry, Route_Riter has correctly placed the new item in the same place in the consist as the one it replaced - in this case at the end of the train. The image below shows the consist inside ConTEXT with the brake van where it should be at the end of the train.

Corrected Consist in ConTEXT


Miscellaneous errors

Typographical errors are the most common cause of errors in this category.

Quick Consist Report Screen

In the report screen above you will see the line

Consist AU_8048le has an incorrect TrainCfg entry of A_8048le

This error usually occurs when someone has edited the .CON file incorrectly. Repair is simple: the consists are located in the Trains\Consists folder of your MSTS installation. Open the affected consist file (AU_8048le.con in the example above) with a Unicode-aware Editor such as Wordpad or the excellent freeware ConTEXT Text Editor.

The TrainCfg line must match exactly the Consists filename - in this case it doesn't (A_8048le instead of AU_8048le):

ConTEXT screen

Correct the Traincfg line so that it reads exactly as the filename (and yes, CASE is important) as below, then save the file, thus eliminating that error:

ConTEXT screen consist corrected

Another typo that is easy to overlook - has the file been working until you edited it? Check that you haven't inadvertently added a line feed at the beginning of your file (easy to do if you hit Enter twice when selecting a file to edit). Thanks to René Mikkelsen for this tip.

Additional line feed at start of Eng file



Finally, run the "Fix CON Files" option (number 3 in the image at top of this page) to ensure that any changes keep the case correct and that say you replace LNER_BrakeVan with LNER Brake Van then the Fix .con will ensure it is encased in quotes.



I set up my MSTS for this tutorial by by creating a couple of consists of loco plus carriages. I then copied the contents of the carriages folder to another folder, deleted one WAG file, then deleted the old folder. I also altered a line in another Consist file, thus setting up my MSTS to demonstrate examples of the three most common errors:

  1. an item of rolling stock that is present in your MSTS installation, but in a different folder to that expected;
  2. an item of rolling stock that is not present in your MSTS installation; and
  3. a miscellaneous category such as a typographical error

In other words, two consists that contained a piece of rollingstock that no longer existed as well as an item/items that was/were now found in another folder. These are the two most common errors with consists.