Re: [GNC-dev] [GNC] Failed - import of QIF files from Quicken

2020-02-19 Thread Tom Hatzigeorgiou
If what I asked cannot be done i will try to produce a file with the errorsome 
other way
I would suggest to take these emails offline.  I think they confuse the user 
community

I will be in touch

Thanks


On Feb 18, 2020 5:34 PM, "Frank H. Ellenberger"  
wrote:


Am 18.02.20 um 22:52 schrieb Christopher Lam:
> Sorry. Please ask other devs on public mailing list.
>
> On Tue, 18 Feb 2020 at 15:51, Tom Hatzigeorgiou  wrote:
>
>> To do this someone will need to help me.
>> I don't know how projects like this work.
>> I have no idea where the program source exists and the tools I will need
>> to manipulate it.
>>
>> I was thinking that a very simple way to debug the code is, for someone to
>> place a display on a version of the new importer where every record that it
>> processes gets displayed (in a log file) before it gets imported.
>> This way by running the importer I will see at what record(s) it failed.
>> I would run it multiple times until I find and eliminate ALL the records
>> of my file that it fails on.
>> When all bad records get eliminated and my file gets loaded correctly by
>> the current importer, I don't think I would have a problem sending you all
>> those bad records for you to analyze and see where the new importer has
>> gone bad.
>>
>> DO you think something like the above can be done?

At least it should - instead of "Failed" - say "Failed to read line nr %d".

That would reduce the burden of bisect.

~Frank


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About Gnucash

2020-02-19 Thread Geert Janssens
Where to look does depend on the source of your flatpak unfortunately.

The link John points to is the one used for the gnucash nightly flatpak builds 
which you can 
download from https://code.gnucash.org/builds/flatpak/

If however you used the flatpak provided by flathub, the link would be
https://github.com/flathub/org.gnucash.GnuCash/blob/master/modules/aqbanking.json
The rest of John's explanation applies equally there.

Geert

Op woensdag 19 februari 2020 05:46:57 CET schreef John Ralls:
> It is easy: Just look at
> https://github.com/Gnucash/gnucash-on-flatpak/blob/master/modules/aqbanking
> .json. There's a history button on the right side near the top that you can
> use to look back to when your flatpak was built.
> 
> Regards,
> John Ralls
> 
> > On Feb 18, 2020, at 4:29 PM, Chris Graves  wrote:
> > 
> > Hi Frank,
> > Thanks for the tip, I recently learned of the aqbanking-cli command and
> > have been searching for a guide on it's use.  From what I've found (or
> > not), looks like I'll have to review the source code.
> > 
> > Also, with all the recent issues with AQB for both HBCI and OFX users, I
> > was thinking that it would be nice to have quick, easy access to it's
> > version info.  Not so easy/obvious from a flatpak install unless I'm
> > missing something (though I have found how to access it).
> > 
> > Chris
> > 
> > On Mon, Feb 17, 2020 at 8:30 PM Frank H. Ellenberger
> >  wrote: To get the important versions of
> > Aqbanking and it's helper library Gwenhywfar, you can enter the command
> > 
> >  aqbanking-cli versions
> > 
> > Regards
> > Frank
> > 
> > Am 18.02.20 um 04:45 schrieb John Ralls:
> > >> On Feb 17, 2020, at 4:26 PM, chris graves 
> > >> wrote:
> > >> 
> > >> On the About GnuCash window, is displayed among other things
> > >> Version
> > >> Build ID
> > >> Finance::Quote
> > >> 
> > >> Question, should the AQBanking version be displayed as well?  Or
> > >> perhaps is this just opening up a whole can of worms for all included
> > >> third party s/w?> > 
> > > Not really a can of worms, but not really necessary because unless the
> > > user is building dependencies themselves we can pretty easily find out
> > > what version of any dependency they've got: We build the Mac and
> > > Windows bundles ourselves and https://repology.org will tell us pretty
> > > quickly what version of any dependency goes with any distro.
> > > 
> > > Finance::Quote is a bit different because it's so easily
> > > obtained/upgraded from CPAN that a lot of users won't have what's in
> > > their distros; it's also installed outside of the Windows and Mac
> > > bundles.
> > > 
> > > Regards,
> > > John Ralls
> 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] [GNC] Failed - import of QIF files from Quicken

2020-02-19 Thread Geert Janssens
They should not be taken off-line, they should be taken to gnucash-devel.

I have purposely left gnucash-user in cc in this mail to inform everybody, but 
please on future 
replies remove gnucash-user from the recipient list and only post to 
gnucash-devel.

Regards,

Geert

Op woensdag 19 februari 2020 05:18:06 CET schreef Tom Hatzigeorgiou:
> If what I asked cannot be done i will try to produce a file with the
> errorsome other way I would suggest to take these emails offline.  I think
> they confuse the user community
> 
> I will be in touch
> 
> Thanks
> 
> 
> On Feb 18, 2020 5:34 PM, "Frank H. Ellenberger"
>  wrote:
> Am 18.02.20 um 22:52 schrieb Christopher Lam:
> > Sorry. Please ask other devs on public mailing list.
> > 
> > On Tue, 18 Feb 2020 at 15:51, Tom Hatzigeorgiou  wrote:
> >> To do this someone will need to help me.
> >> I don't know how projects like this work.
> >> I have no idea where the program source exists and the tools I will need
> >> to manipulate it.
> >> 
> >> I was thinking that a very simple way to debug the code is, for someone
> >> to
> >> place a display on a version of the new importer where every record that
> >> it
> >> processes gets displayed (in a log file) before it gets imported.
> >> This way by running the importer I will see at what record(s) it failed.
> >> I would run it multiple times until I find and eliminate ALL the records
> >> of my file that it fails on.
> >> When all bad records get eliminated and my file gets loaded correctly by
> >> the current importer, I don't think I would have a problem sending you
> >> all
> >> those bad records for you to analyze and see where the new importer has
> >> gone bad.
> >> 
> >> DO you think something like the above can be done?
> 
> At least it should - instead of "Failed" - say "Failed to read line nr %d".
> 
> That would reduce the burden of bisect.
> 
> ~Frank
> 
> 
> ___
> gnucash-user mailing list
> gnucash-u...@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.


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] [GNC] Fwd: Fwd: Failed - import of QIF files from Quicken

2020-02-19 Thread Geert Janssens
Op dinsdag 18 februari 2020 23:04:59 CET schreef crazylyle:
> So you are suggesting reducing the size of our QIF files to a small
> debuggable size.
> 
> My QIF file is 653,808 lines long.  About 2^20.  So just using a binary
> search would
> take at least 20 trials to find the first line that it fails on.  Not
> exactly something that
> seems practical.  And that's just for my input file.
> 
Wow, while I appreciate everybody has limited time I don't consider 20 attempts 
to find the 
source of a bug a lot...

> And of course, just feeding a partial file might produce a failure, but a
> failure of a
> different kind, so this won't necessarily get us anywhere.

Someone will have to do the work. And at this point you are the one with the 
data that fails :)
Others have offered to help but we will need some input file which reproduces 
the error.

However before going that route, have you checked whether the trace file has 
any useful 
information ?
Here's a link that explains where you can find the tracefile
https://wiki.gnucash.org/wiki/Tracefile
It's likely it contains a guile backtrace of the failure.

Geert
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Supported language-Lao

2020-02-19 Thread Frank H. Ellenberger
Hello Souksakhone,

Am 11.02.20 um 19:27 schrieb Souksakhone Phomphakdy:
> Hello Frank,
> 
> Thank you for your prompt reply. I really appreciated it. I had used many Lao 
> keyboards type Lao in GnuCash but I was not successful. See attached file for 
> how it looks. I can type Lao in other programs like photoshop, MS Word, Paint 
> and Etc... Can you please help me to get the Lao display correctly? is there 
> an option where I can change font type?

As I am no Windows user, others might have better instructions.
At first you need to determinate the fonts on your system, which include
Lao characters.

Then you should follow
https://wiki.gnucash.org/wiki/GTK3#Typefaces
to set them for the program surface and use the menu entry
Edit->Stylesheets
to apply them on the reports.


> By the way, when I went to GnuCash webiste and under Donations  I did not see 
> PayPal or Master or Visa option.

If you follow the sourceforge link from
https://www.gnucash.org/donate.phtml
you can select Paypal or "Debit or Credit Card".

> 
> Thank you,
> 
> Souksakhone
> 

Regards
Frank
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] [GNC] QIF file import failed -- but no errors or warnings

2020-02-19 Thread Christopher Lam
Moved to devel because this is developer stuff. It's difficult because the
programming was done 20 years ago when toolkits were much more primitive.
You have two options to log.

in C, add PWARN ("retval is %s", retval? "True" : "False"); in
assistant-qif-import.c:3050
in guile, add (gnc:pk "objects1 = " object1 " object2=" object2) in
qif-to-gnc.scm

On Tue, 18 Feb 2020 at 17:44, crazylyle  wrote:

> I downloaded the current source code and built it.
>
> After gnucash tries to import my QIF file, I get the single word "Failed".
> Tracking
> this down, it is coming from
>
>  /* Inform the user. */
> gnc_progress_dialog_set_sub (wind->convert_progress, _("Failed"));
>
> in assistant-qif-import.c at about line 3105, and is a result of
>
> if (scm_is_symbol (retval)) at line 3093 before that.  The scm_is_symbol
> seems to be a scheme function that determines if the retval is a scheme
> symbol.
>
> The retval is set by calling scm_apply (qif_to_gnc, ...) at about line
> 3040,
> which then takes us to the Scheme function qif-import:qif-to-gnc in
> qif-to-gnc.scm.  which seems to be about 200 lines of Scheme code
> which is probably catching an exception but generates no error messages
> or hint as to what is wrong.
>
> What with the large level of complexity in building gnucash using cmake,
> scheme, swig, and c,
> and the resulting dynamic loading of libraries,
> it's difficult for an outsider to step in and try to help.
>
>
>
>
>
> --
> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
> ___
> gnucash-user mailing list
> gnucash-u...@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.
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About Gnucash

2020-02-19 Thread chris graves
The version info can also be obtained via:
➜  ~ flatpak run --command=sh  org.gnucash.GnuCash
[📦 org.gnucash.GnuCash ~]$ aqbanking-cli versions
Versions:
 AqBanking-CLI: 6.1.0
 Gwenhywfar   : 5.2.0.0
 AqBanking: 6.1.0.0

> On Feb 19, 2020, at 1:06 AM, Geert Janssens  
> wrote:
> 
> Where to look does depend on the source of your flatpak unfortunately.
>  
> The link John points to is the one used for the gnucash nightly flatpak 
> builds which you can download from https://code.gnucash.org/builds/flatpak/ 
> 
>  
> If however you used the flatpak provided by flathub, the link would be
> https://github.com/flathub/org.gnucash.GnuCash/blob/master/modules/aqbanking.json
>  
> 
> The rest of John's explanation applies equally there.
>  
> Geert
>  
> Op woensdag 19 februari 2020 05:46:57 CET schreef John Ralls:
> > It is easy: Just look at
> > https://github.com/Gnucash/gnucash-on-flatpak/blob/master/modules/aqbanking 
> > 
> > .json. There's a history button on the right side near the top that you can
> > use to look back to when your flatpak was built.
> > 
> > Regards,
> > John Ralls
> > 
> > > On Feb 18, 2020, at 4:29 PM, Chris Graves  > > > wrote:
> > > 
> > > Hi Frank,
> > > Thanks for the tip, I recently learned of the aqbanking-cli command and
> > > have been searching for a guide on it's use.  From what I've found (or
> > > not), looks like I'll have to review the source code.
> > > 
> > > Also, with all the recent issues with AQB for both HBCI and OFX users, I
> > > was thinking that it would be nice to have quick, easy access to it's
> > > version info.  Not so easy/obvious from a flatpak install unless I'm
> > > missing something (though I have found how to access it).
> > > 
> > > Chris
> > > 
> > > On Mon, Feb 17, 2020 at 8:30 PM Frank H. Ellenberger
> > > mailto:frank.h.ellenber...@gmail.com>> 
> > > wrote: To get the important versions of
> > > Aqbanking and it's helper library Gwenhywfar, you can enter the command
> > > 
> > >  aqbanking-cli versions
> > > 
> > > Regards
> > > Frank
> > > 
> > > Am 18.02.20 um 04:45 schrieb John Ralls:
> > > >> On Feb 17, 2020, at 4:26 PM, chris graves  > > >> >
> > > >> wrote:
> > > >> 
> > > >> On the About GnuCash window, is displayed among other things
> > > >> Version
> > > >> Build ID
> > > >> Finance::Quote
> > > >> 
> > > >> Question, should the AQBanking version be displayed as well?  Or
> > > >> perhaps is this just opening up a whole can of worms for all included
> > > >> third party s/w?> > 
> > > > Not really a can of worms, but not really necessary because unless the
> > > > user is building dependencies themselves we can pretty easily find out
> > > > what version of any dependency they've got: We build the Mac and
> > > > Windows bundles ourselves and https://repology.org 
> > > >  will tell us pretty
> > > > quickly what version of any dependency goes with any distro.
> > > > 
> > > > Finance::Quote is a bit different because it's so easily
> > > > obtained/upgraded from CPAN that a lot of users won't have what's in
> > > > their distros; it's also installed outside of the Windows and Mac
> > > > bundles.
> > > > 
> > > > Regards,
> > > > John Ralls
> > 
> > ___
> > gnucash-devel mailing list
> > gnucash-devel@gnucash.org 
> > https://lists.gnucash.org/mailman/listinfo/gnucash-devel 
> > 
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About Gnucash

2020-02-19 Thread Geert Janssens
Right, and even in one single command like this:
~ flatpak run --command=aqbanking-cli  org.gnucash.GnuCash versions

Regards,

Geert

Op woensdag 19 februari 2020 16:53:40 CET schreef chris graves:
> The version info can also be obtained via:
> ➜  ~ flatpak run --command=sh  org.gnucash.GnuCash
> [📦 org.gnucash.GnuCash ~]$ aqbanking-cli versions
> Versions:
>  AqBanking-CLI: 6.1.0
>  Gwenhywfar   : 5.2.0.0
>  AqBanking: 6.1.0.0
> 
> > On Feb 19, 2020, at 1:06 AM, Geert Janssens 
> > wrote:
> > 
> > Where to look does depend on the source of your flatpak unfortunately.
> > 
> > The link John points to is the one used for the gnucash nightly flatpak
> > builds which you can download from
> > https://code.gnucash.org/builds/flatpak/
> > 
> > 
> > If however you used the flatpak provided by flathub, the link would be
> > https://github.com/flathub/org.gnucash.GnuCash/blob/master/modules/aqbanki
> > ng.json
> >  > king.json> The rest of John's explanation applies equally there.
> > 
> > Geert
> > 
> > Op woensdag 19 februari 2020 05:46:57 CET schreef John Ralls:
> > > It is easy: Just look at
> > > https://github.com/Gnucash/gnucash-on-flatpak/blob/master/modules/aqbank
> > > ing
> > >  > > nking> .json. There's a history button on the right side near the top
> > > that you can use to look back to when your flatpak was built.
> > > 
> > > Regards,
> > > John Ralls
> > > 
> > > > On Feb 18, 2020, at 4:29 PM, Chris Graves  > > > > wrote:
> > > > 
> > > > Hi Frank,
> > > > Thanks for the tip, I recently learned of the aqbanking-cli command
> > > > and
> > > > have been searching for a guide on it's use.  From what I've found (or
> > > > not), looks like I'll have to review the source code.
> > > > 
> > > > Also, with all the recent issues with AQB for both HBCI and OFX users,
> > > > I
> > > > was thinking that it would be nice to have quick, easy access to it's
> > > > version info.  Not so easy/obvious from a flatpak install unless I'm
> > > > missing something (though I have found how to access it).
> > > > 
> > > > Chris
> > > > 
> > > > On Mon, Feb 17, 2020 at 8:30 PM Frank H. Ellenberger
> > > > mailto:frank.h.ellenber...@gmail.com>>
> > > > wrote: To get the important versions of Aqbanking and it's helper
> > > > library Gwenhywfar, you can enter the command> > > 
> > > >  aqbanking-cli versions
> > > > 
> > > > Regards
> > > > Frank
> > > > 
> > > > Am 18.02.20 um 04:45 schrieb John Ralls:
> > > > >> On Feb 17, 2020, at 4:26 PM, chris graves  > > > >> > wrote:
> > > > >> 
> > > > >> On the About GnuCash window, is displayed among other things
> > > > >> Version
> > > > >> Build ID
> > > > >> Finance::Quote
> > > > >> 
> > > > >> Question, should the AQBanking version be displayed as well?  Or
> > > > >> perhaps is this just opening up a whole can of worms for all
> > > > >> included
> > > > >> third party s/w?> >
> > > > > 
> > > > > Not really a can of worms, but not really necessary because unless
> > > > > the
> > > > > user is building dependencies themselves we can pretty easily find
> > > > > out
> > > > > what version of any dependency they've got: We build the Mac and
> > > > > Windows bundles ourselves and https://repology.org
> > > > >  will tell us pretty quickly what version of
> > > > > any dependency goes with any distro.
> > > > > 
> > > > > Finance::Quote is a bit different because it's so easily
> > > > > obtained/upgraded from CPAN that a lot of users won't have what's in
> > > > > their distros; it's also installed outside of the Windows and Mac
> > > > > bundles.
> > > > > 
> > > > > Regards,
> > > > > John Ralls
> > > 
> > > ___
> > > gnucash-devel mailing list
> > > gnucash-devel@gnucash.org 
> > > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
> > > 


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] [GNC] Fwd: Failed - import of QIF files from Quicken

2020-02-19 Thread Derek Atkins
Hi,

Adrien Monteleone  writes:

> I seem to recall a development goal being to eliminate Scheme code
> except for reports.
>
> This might be a good candidate for just re-writing this in C/C++ with
> proper tests and verbose error output and/or logging.
>
> If someone with the skillset is interested of course.

I started a re-write of the QIF importer in C a very very long time
ago.  That (failed) re-write has long-since been removed from the repo.
It turns out that C is not very good at tokenizing and parsing strings.
Funny that.

I am sure that using std::string in C++ would make it a lot easier to
reprogram, but honestly the existing QIF importer is fairly robust and
fairly well tested (via time).

The real downside of the current implementation is that it doesn't have
a test suite where you can throw test-case QIF files at it and ensure
you get a reasonable answer.

Having said that, whether or not you can actually throw an error with
the line number will depend deeply on where it fails.  The way the
process works is that it reads in the file (line by line) and tokenizes
the data.  At this point it would be relatively easy to output the line
number.  Then, after the file is tokenized, it actually goes through and
parses the tokens for QIF correctness; most likely THIS is where the
failure occurs, but at this point we don't have line numbers any more.

So we COULD add a "see line number X" into the qif-file.scm (IIRC), but
I doubt that's the stage of the process where the error happens.

> Regards,
> Adrien

-derek
-- 
   Derek Atkins 617-623-3745
   de...@ihtfp.com www.ihtfp.com
   Computer and Internet Security Consultant
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About Gnucash

2020-02-19 Thread chris graves
Cool.  I tried similar to what you did, but didn't understand where to put the 
aqbaning-cli param (versions) -- not too intuitive...

Yeah, I know, RTFM...

> On Feb 19, 2020, at 10:07 AM, Geert Janssens  
> wrote:
> 
> flatpak run --command=aqbanking-cli  org.gnucash.GnuCash versions

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] About Gnucash

2020-02-19 Thread Geert Janssens
It took me a while to figure it out as well. While I'm currently maintaining 
the flatpak 
for gnucash I'm far from mastering the whole system.

I personally find its documentation fairly sparse :(

Geert

Op woensdag 19 februari 2020 20:06:30 CET schreef chris graves:
> Cool.  I tried similar to what you did, but didn't understand where to put
> the aqbaning-cli param (versions) -- not too intuitive...
> 
> Yeah, I know, RTFM...
> 
> > On Feb 19, 2020, at 10:07 AM, Geert Janssens 
> > wrote:
> > 
> > flatpak run --command=aqbanking-cli  org.gnucash.GnuCash versions


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] [GNC] QIF file import failed -- but no errors or warnings

2020-02-19 Thread Christopher Lam
Qif importer does have special handling for empty categories. Changing this
is likely to break things elsewhere though.

It would be useful to attach the minimal qif file from selective qif export
from quicken, and insert screenshots from quicken too. Maybe best file bug
in Bugzilla.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] [GNC] QIF file import failed -- but no errors or warnings

2020-02-19 Thread James Peterson
I looked at the trace file being produced in /tmp/gnucash.trace,
but it did not seem to help any.

I added (gnc:pk ...) messages, but none of them ever
appeared.

I added (pk ...) lines to qif-to-gnc.scm to try to trace
what it was doing.  This produced a large amount of output 
on the terminal, but since I am no longer using an KSR-33 
for output, it just whizzed by.

The first failure seemed to be after the listing of all the
accounts, when it suddenly says "!Option:AutoSwitch" in the
QIF file, but I think that was a red herring -- after I deleted
the line and then put it back, it proceeded past that point.

It seems to be failing on each split transaction.  For example,
my first failure is at:

D10/ 2' 1
U-600.00
T-600.00
PCash
S
$0.00
SCharity
EPlanned Parenthood
$-500.00
SCharity
EKUT
$-100.00
^

which should be a cash transaction, from my checking account, for
a total of $600 split into $500 to Planned Parenthood and $100 to KUT.
It seems to dislike the line with just an S on it.

Looking at the transaction in Quicken, it is a split transaction as
described, but the $500 is on line 2, the $100 on line 3 -- line 1 of
the split is empty, possibly as a result of editting -- there used to
be something on line 1, but for some reason it was deleted.

In my QIF code, there is a reference to a Quicken help file that says:

  S: Category in split
  E: Memo in split
  $: Dollar amount of split

so this would seem to be a missing category.

For a missing category with an amount of $0.00, we could obviously ignore
both that part of the split.  But my next problem is a transaction like:

D6/ 5' 4
U-1,238.00
T-1,238.00
N967
PState Farm
S
$-1,238.00
S[Linda's Account]
$-412.00
SCarrying Costs
$412.00
^

where there is an uncategorized expense of $1238.  I think what happened
there is it was originally completely defined, with a category, as a
non-split, and then I came back and split it (my live-in girlfriend pays
1/3 of all housing costs over $500), and Quicken apparently did not carry
the previously defined category into the new split.

Using emacs on the QIF file, to find all lines with just an S,
I went back into Quicken found all the transactions with splits and no
category and editted them to fix the problem, then exported a new QIF
file.

And gnucash now loads all transactions, without failure.

Not right, mind you, but it loads everything.  I end up with a
negative 2 million dollar net worth, but that's a whole different 
problem.

The most helpful thing to do was to put 
(pk "convert transaction" xtn)
into the qif-to-gnc.scm file at about here:

 (for-each
  (lambda (xtn)
;; Update the progress.
(update-progress)

(pk "convert transaction" xtn)
(if (not (qif-xtn:mark xtn))
;; Convert into a GnuCash transaction.

that line prints each transaction just before it tries to convert
it, so when it fails, the last transaction printed is what caused
the failure.  I can't tell what all the fields of the printed
transaction are but a few, like the date, the amount, the payee
or the accounts are enough to help me find it in the QIF file.

Maybe have a way for the --debug --extra flags to put this into
the trace file?  And then tell people who have QIF loading problems
to run it with --debug --extra and look at the trace file.

jim





On Wed, 2020-02-19 at 15:31 +, Christopher Lam wrote:
> Moved to devel because this is developer stuff. It's difficult because the
> programming was done 20 years ago when toolkits were much more primitive.
> You have two options to log.
> 
> in C, add PWARN ("retval is %s", retval? "True" : "False"); in assistant-
> qif-import.c:3050
> in guile, add (gnc:pk "objects1 = " object1 " object2=" object2) in qif-to-
> gnc.scm
> 
> On Tue, 18 Feb 2020 at 17:44, crazylyle  wrote:
> > I downloaded the current source code and built it.
> > 
> > After gnucash tries to import my QIF file, I get the single word
> > "Failed". 
> > Tracking
> > this down, it is coming from 
> > 
> >  /* Inform the user. */
> > gnc_progress_dialog_set_sub (wind->convert_progress, _("Failed"));
> > 
> > in assistant-qif-import.c at about line 3105, and is a result of 
> > 
> > if (scm_is_symbol (retval)) at line 3093 before that.  The scm_is_symbol
> > seems to be a scheme function that determines if the retval is a scheme
> > symbol.
> > 
> > The retval is set by calling scm_apply (qif_to_gnc, ...) at about line
> > 3040,
> > which then takes us to the Scheme function qif-import:qif-to-gnc in
> > qif-to-gnc.scm.  which seems to be about 200 lines of Scheme code
> > which is probably catching an exception but generates no error messages
> > or hint as to what is wrong.
> > 
> > What with the large level of complexity in building gnucash using cmake,
> > scheme, swig, and c,
> > and the resulting dynamic loading of libraries, 
> > it's difficult for an outsider to step in and try to help.
> > 
> > 
> > 
>