Cannot import CSV file

Running kmymoney 5.1.3 on windows 11os. I changed the name on an account and now when I try to import a CSV file it crashes the program. Name was changed because it was a Td Ameritrade account which became a Charles Schwab Account.

Do you get any error message, or the program just closes?
You might try running from command line - any app that gives you a command line. You need to find the actual location of the kmymoeny.exe file. You can then either just enter the full path to the program, or change directory to where the .exe file is, and just type kmymoney.exe. The program sometimes outputs useful messages to the console, which could help determine the cause of the crash.

The program just closes. Not sure I am techy enough to do your suggestion.

First, do you have a backup from before the problem showed up? It might be interesting to compare that to the earliest backup after the problem started. That’s not necessarily trivial, due to the way KMM stores it’s data, but it’s possible.

At what point in the csv import does it crash?

Before it crashes, can you select the Tools/Consistency Check menu to see if it reports any problems. (I don’t actually expect any.)

Can you change the name of the account back to what it was, and see if the crash still occurs?

Can you create a new data file, create one account for the import and try the import? That will show whether or not the account name actually make a difference or not.

These are all various things to try, as I don’t have any definite ideas of what might be causing the crash.

okay i will work on suggestions

I changed the name back and was able to import the CSV file. So I guess changing the name does effect it.

This is what I have come up with for a final solution. I change the name back to the new name. When I start a CSV I use the original Investment firm (TD Ameritrade) and when I import the CSV and it ask for the investment firm I select the new account name. It accepts it without shutting down the program. Go figure???

Note that when you import an investment csv, it is not asking for the investment firm, it is asking for the name of the Account into which you want to import the data. So, I’m still not sure exactly where in the import process it was crashing. I really want to understand this, as it shouldn’t crash at that point, it should probably issue some error message.

At the start of importing a CSV, it ask what kind of import it is. I select investment and here is where I use a TD Ameritrade profile (you are right it does not ask for an investment firm but a profile, my mistake). If I use a Charles Schwab profile the program is terminated after going through all the steps. Is there a way to send a video showing what happens.

Ah! No video necessary. A csv import profile gets named when you first create it. It has nothing directly to do with where the data comes from, it just includes the things you would otherwise have to set each time you import a csv file, and you get to name it arbitrarily, although naming it after the data source certainly makes sense. Since each source of csv data does thing differently, it helps to be able to save configuration such as which data type is in which column, and how many header lines you need to ignore.
So, I’m wondering if the csv format changed in any way after TD Ameritrade was bought by Schwab (or the other way around?) Did you already have a Schwab csv import profile?
Take a look in ~/.config/kmymoney for a file named csvimporterrc. (Make a copy, so you don’t accidentally change the original.) Look inside for sections for TD and Schwab. Compare them. I’m guessing some difference is causing the crash when used on data which should be imported using the other.

I made a profile for each of my accounts (I thought that was how it we supposed to be) When I changed the name of the Td Ameritrade account, I also created a new profile with the new name. I will check and see if there are differences. Thanks for the help.

You should have a different profile for each different configuration you need based on the format of the csv file itself. There is no need for a different profile per account. Also, the names are completely arbitrary, so the name of the profile does not need to match the name of the account. Keeping them matched just helps you remember which one to use.

For example, if you have multiple accounts with the same back, the accounts each need a different name, but if you import by csv, then you can have a single profile, because all those csv files will be produced with the same layout and formatting.

1 Like