[GNC] Can't seem to load custom reports

Geert Janssens geert.gnucash at kobaltwit.be
Tue Sep 10 14:36:55 EDT 2019


In gnucash 3.x all uses of gnucash printf have been replaced with guile's own 
"format" function [1]. The printf hack was calling the c-function printf, 
which is adding overhead for no gain.

The same conversion from printf to (format ) will have to be applied to Doug's 
reports.

Regards,

Geert

[1] https://www.gnu.org/software/guile/manual/guile.html#index-format-1

Op dinsdag 10 september 2019 19:48:32 CEST schreef Adrien Monteleone:
> cat $TMPDIR/gnucash.trace
> 
> will show some info, but as I noted in the first post, not enough to
> determine which report(s) are the problem.
> 
> However, running GnuCash from the terminal like so:
> 
> /Applications/Gnucash.app/Contents/MacOS/Gnucash --debug --log gnc.scm=debug
> 
> Will generate more info that is useful. The output I included in the first
> post are from 3 such runs.
> 
> This is documented at:
> https://wiki.gnucash.org/wiki/Custom_Reports#Debugging_your_report
> 
> From there, the tracefile is output to stderr which in this case was the
> same terminal. So I only need to see if the report(s) showed up in the
> menu, and then checked the terminal each time as I uncommented them one by
> one in the config-user.scm file.
> 
> Each one that has a problem was indicated in the terminal by a ‘failed to
> compile’ error and noted the info about `gnucash main` not being found. (as
> well as the `printf` module)
> 
> I tried changing from loading `gnucash main` to `gnucash utilities` on a
> hunch. (no real expectation that would work of course since the referenced
> code is likely entirely different) That exposed a failure for `printf`
> which I then commented out, but of course, the later code needs it, so it
> still failed. I’d have to know what was in `gnucash main` that the report
> needs as well as how it used `printf` and then re-write all of that. As I
> don’t yet know Scheme, I’m not able to do so just yet. I was hoping Doug
> (who published these reports) might have updated them.
> 
> Regards,
> Adrien
> 
> > On Sep 10, 2019 w37d253, at 11:07 AM, Geert Janssens
> > <geert.gnucash at kobaltwit.be> wrote:
> > 
> > Hi John,
> > 
> > As you suggest this is likely due to errors in the report code. If so
> > there
> > should be more details either in the gnucash trace file or on the console.
> > I'm not on Macos so I'm not sure where console messages get written for
> > applications that are launched from the gui.
> > You may be able to run gnucash in a terminal in which case these message
> > will probably be printed in that terminal.
> > 
> > Regards,
> > 
> > Geert
> > 
> > Op dinsdag 10 september 2019 16:39:47 CEST schreef John Morris:
> >> Hi Adrien,
> >> 
> >>  I worked my way through the GnuCash wiki on loading custom reports at
> >> 
> >> https://wiki.gnucash.org/wiki/Custom_Reports#Where_to_find_existing_repor
> >> ts
> >> . I made a tiny bit of headway, but not much.
> >> 
> >>  I have set up a new file called config-user.scm in ~/Library/Application
> >> 
> >> Support/GnuCash on my fully updated Mojave system. This replaced the
> >> filed
> >> called config.user I copied from my Yosemite installation running GnuCash
> >> 2.6.16.
> >> 
> >>  As part of following the instruction on the wiki, I copied the Hello
> >>  World
> >> 
> >> report from the GnuCash application package and modified it slightly to
> >> be
> >> different from the example report. I then placed it in
> >> ~/Library/Application Support/GnuCash/John Report and added
> >> 
> >> (load (gnc-build-userdata-path "John-Report.scm”))
> >> 
> >> as the first line of config-user.scm. This loaded a report called John
> >> Report into the top level of the Reports menu, so I know I at least have
> >> that part working.
> >> 
> >> However, using a similar line in the config-user.scm file for the reports
> >> I
> >> downloaded from this list gives me nothing in the Reports menu. In fact,
> >> if
> >> I place those lines before the John-Report line, even it does not appear.
> >> I
> >> guess some problem in those other reports is terminating the whole
> >> loading
> >> process. That seems like an odd way of doing things. I tried this singly
> >> with each report an none of them worked, including the consolidation
> >> report
> >> Doug Doughty contributed on June 4, 2018 as an update to work with
> >> GnuCash
> >> 3.1.
> >> 
> >> I guess I have to wait until I have time to learn Scheme or someone else
> >> updates these reports to work with GnuCash’s ever-changing interface.
> >> 
> >> Best,
> >> John
> >> 
> >>> On Sep 9, 2019, at 5:57 PM, Adrien Monteleone
> >>> <adrien.monteleone at lusfiber.net> wrote:
> >>> 
> >>> I didn’t get to test #1 & #2 again, but sticking with #3, I started
> >>> GnuCash with
> >>> 
> >>> --debug --log gnc.scm=debug
> >>> 
> >>> And got some useful info.
> >>> 
> >>> It seems all but one of the reports were using:
> >>> 
> >>> (use-modules (gnucash main))
> >>> 
> >>> which apparently doesn’t exist any more.
> >>> 
> >>> The one report that did work was using:
> >>> 
> >>> (use-modules (gnucash utilities))
> >>> 
> >>> I haven’t had a look yet to see what the changes were and what that
> >>> includes.
> >>> 
> >>> The other failing reports also use:
> >>> 
> >>> (use-modules (gnucash printf))
> >>> 
> >>> which apparently also doesn’t exist and was commented out in the one
> >>> working report.
> >>> 
> >>> Unfortunately, the code for those reports would have to be updated it
> >>> seems to avoid those modules as they fail with them commented out.
> >>> (understandably)
> >>> 
> >>> The following loads and runs correctly:
> >>> 
> >>> consolidate-transactions.scm
> >>> 
> >>> The following all fail and need to be updated:
> >>> 
> >>> compare-cash-flows.scm
> >>> current-vs-average.scm
> >>> transaction-budget.scm
> >>> reconcile.scm (supposedly a re-write, was this already incorporated into
> >>> the included report?) missing-checks.scm (I don’t use this, but noticed
> >>> it failed as well)
> >>> 
> >>> If anyone has any info on fixing the above reports with respect to the
> >>> main & printf modules, or where I might find more current versions, many
> >>> thanks.
> 
> _______________________________________________
> 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