[GNC] Error importing QIF file

parag puranik parag_puranik at yahoo.com
Mon Oct 25 08:25:10 EDT 2021


 Records are less than 500.I am not familiar with splitting files process. I'll study for a while the resources you suggested (A Big Thanks) and then try.
    On Monday, 25 October, 2021, 09:19:03 am IST, David H <hellvee at gmail.com> wrote:  
 
 Hello again parag puranik,
Please use reply-all to keep the discussion on the mailing list so everyone is across everything.  I'm not a Gnucash developer or familiar with the importers as I never use them and others that use them often can probably offer more relevant suggestions :-)  See my responses/suggestions highlighted in yellow below.
On Sun, 24 Oct 2021 at 23:24, parag puranik <parag_puranik at yahoo.com> wrote:

 I tried creating a new file in App, exported it in QIF format and successfully imported the same in Gnucash Desktop. Everything is fine in case of a fresh file export+import procedure. 

OKso it seems to definitely be an issue with your data then. How many records are in your file anyway, I can't imagine it's in the hundreds if you're using the android app to enter them? 
Personally I would do the binary splits of the file as already suggested making sure you don’t split a transaction in the middle. This shouldn't take too long.  I think I read somewhere years ago that you only need a maximum of 7 splits to find a target when using a binary search so this should be similar.  My simplistic figures suggest a 200 record file would require up to 9 splits in the worst case. So a maximum of split file / import part file – say a couple of minutes each x 9 = about 18 - 20 minutes should be enough to identify the record causing the problem and you may be able to sort it out yourself once you've identified the problem record - you would have had your answer by now :-)  
Checkout:

Gnucash QIF format document - https://github.com/Gnucash/gnucash/blob/maint/gnucash/import-export/qif-imp/file-format.txt 
 

and

Gnucash QIF Import code file - https://github.com/Gnucash/gnucash/blob/maint/gnucash/import-export/qif-imp/qif-file.scm




I could be totally wrong but the error message seems come from line 974 in the previous bit of code – according to the comment at line 921 it seems to be checking for valid date formats (d-m-y, y-m-d, etc) and also that amount fields are decimal (999.99) or comma format (999,99):-




My problem is only with my earlier file which I exported, but could not import in Desktop due to the Error message. I want to know the basis of the generation of that error message and get help in importing that file in desktop.

 I'm sure you do but you have to remember that this is a volunteer project / developmentteam who probably have other priorities and will take time to get toyour problem. Gnucash is a huge project with code in multiple languages going back 20+ years and developers come and go so it would take time to familiarise themselves with the code and work through it to document it and give you a list of conditions as to exactly why a particular error message is displayed.Their first response is likely to be to tell youto check whether it’s an existing bug and if not to lodge a bugreport at Gnucash Bugzilla (https://bugs.gnucash.org).  They're also likely to want to see your file as sometimes a quick scan through a file can identify the issue. You've already had other suggestions re splitting your file and importing in parts to identify the problem and this is probably the fastest and most logical approach right now. I suspect you have one or more hidden special characters in your file which is causing a record to be split mid record and a misalignment in your file hence the “Share Price” text in the error message. Seems the android app has had some of these in the past where users have done a copy and paste into a transaction on android.  These won’t be obvious in Notepad or Wordpad as they don't display special characters so download either the Textpad (https://www.textpad.com/download) or Notepad++ (https://notepad-plus-plus.org/downloads/) text editor and use one of these to inspect your file. You can turn on the display of special characters in these editors – in Textpad click the icon to the left of the globe – looks like a reverse “P” and in Notepad++ it’s the same icon.

I could not locate any trace file in Win10.I don't think the App compresses the file before exporting because when I open the QIF file in Text Editor-Windows Notepad, it opens successfully. The text editor surely doesn't decompress file before opening.

 Noit won’t usually uncompress a file automatically – I was justgoing by the bug report I read on the android app website soobviously irrelevant to your issue. 
I just want the members / Gnucash Team to focus on the generated error message I posted in my first post and let me know in what circumstances this message gets generated and how to repair the QIF file so that I can import it into Desktop Gnucash.
  
If you don't want to split your file and import partial files Iwould suggest you do the following for starters:-

Readthe file-format.txt text file mentioned above if you are unfamiliarwith the qif file format.


Checkthat each record begins on a new line and that each record has a CRLF (easier to see in Notepad++) at the end of the record and notsomewhere in the middle thus splitting it mid-record.


CheckDate fields for valid date format (d-m-y, y-m-d, etc) and valid date, check amount fieldsfor valid format amounts.


If you can identify the problem record, maybe there's more than one, and you can't see why it would cause a problem then paste it into a message and post it here so the experts can eyeball it and suggest a solution.




Cheers David H. 
On Sunday, 24 October, 2021, 04:18:44 pm IST, David H <hellvee at gmail.com> wrote:  
 
 Hi parag puranik,
I was actually referring to the Gnucash trace file on your Win10 desktop as that is where you had the error and not on your Android device :-)  Also I did see an error report on Ngewi Fet's codinguser website to the effect that when you export qif from the android app it actually creates a compressed .zip file even though it has a .qif suffix - https://github.com/codinguser/gnucash-android/issues/889.  You are probably aware of this if you've used this process previously however.
Cheers David H.
On Sun, 24 Oct 2021 at 18:43, parag puranik via gnucash-user <gnucash-user at gnucash.org> wrote:

Thanks David H for your kind support. I'll upgrade to version 4.8 or so and try. OS:\ is Win10 for importing PC. Regarding log file/trace file :- After exporting from Android phone in QIF format, I carried out Factory reset operation on Android. So no trace file remaining on Android. That original Android app's file has been irretrievably lost for ever.
_______________________________________________
gnucash-user mailing list
gnucash-user at gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

  
  


More information about the gnucash-user mailing list