Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] linebreak destroys qif format #891

Open
nottheend opened this issue Oct 15, 2020 · 4 comments
Open

[BUG] linebreak destroys qif format #891

nottheend opened this issue Oct 15, 2020 · 4 comments

Comments

@nottheend
Copy link

Have had an entry of a transaction where I copied some text over and pasted it in the description field.

It was not shown in Gnucash App, but it turned out that there was a linebreak included.

Once I exported a qif file I was unable to import it to Gnucash.

After debugging the qif file I figured out: the linebreak was printed in the qif and hence spoiled the format

Expected behaciour: any linebreak should be replace on pasting not only ignored and shown as a white space in the App

@FatherMcGruder
Copy link

I've also been having a problem exporting to QIF. I wonder if I have something pasted into one of my transactions that's not allowed. How did you find the line break in the QIF file? Were you able to trace it to a certain transaction and fix it?

@nottheend
Copy link
Author

nottheend commented Nov 9, 2020

Yes, have been able to find in the following way:

  1. Opened the QIF with an text editor
  2. Scammed through the content, always checking the beginning of the line
  3. Whenever I found an unexpected beginning, which means it started with a description of a transaction, I just removed that linebreak

By that I found it quite quickly.

Before that I excluded manually one transaction at a time, then importing it, but that was annoying and took time. Afterwards I checked above method.

@FatherMcGruder
Copy link

FatherMcGruder commented Nov 15, 2020

Yes, have been able to find in the following way:

1. Opened the QIF with an text editor

2. Scammed through the content, always checking the beginning of the line

3. Whenever I found an unexpected beginning, which means it started with a description of a transaction, I just removed that linebreak

By that I found it quite quickly.

Before that I excluded manually one transaction at a time, then importing it, but that was annoying and took time. Afterwards I checked above method.

Thanks, @nottheend. I realized that the problem (part of the problem, anyway) is that GnuCash is actually exporting compressed archives, but giving them a .qif extension rather than a .zip extension. I've updated my issue accordingly. After extracting the archive, I can now open and read the actual QIFs (I have multiple because of transactions in different currencies). Some of them import properly, but the main USD QIF file still does not. I now get a "Commission: Unrecognized or inconsistent format" error in GnuCash Desktop. It looks like someone else got this error in 2014. Something might be wrong with one or more of my USD transactions. I don't see anything weird as I scroll through the QIF so I will try excluding transactions and hopefully I can find it.

UPDATE: It took me a little while, but I found the problem. It was a line break just like the OP. Be careful about copy-pasting into the transaction description field, folks!

@nottheend
Copy link
Author

Good to know @FatherMcGruder, that you also discovered the same.
The linebreak issue should be an easy one to fix, anyway.

I am still thinking to fork this repo to let the development continue, as stated in #841. Recently I dedicatedly ask the repo owner to merge pending pull requests. However, no response yet.

Thumas added a commit to Thumas/gnucash-android that referenced this issue Jun 20, 2021
…d with spaces.

When the description TextView loses focus and before the transaction is saved, all new lines are replaced with spaces.
Thumas added a commit to Thumas/gnucash-android that referenced this issue Jun 21, 2021
Thumas added a commit to Thumas/gnucash-android that referenced this issue Jun 27, 2021
…ption and memo lines of the QIF export.

Empty memos are no longer exported (field is optional in QIF).
Also fixed export test and added new test for no new lines export.
Increased Robolectric version from 4.3.1 to 4.5.1 because of failing build (see robolectric/robolectric#5456).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants