Re: [GNC] Can't seem to load custom reports

2019-09-10 Thread Adrien Monteleone
Thanks!


Regards,
Adrien

> On Sep 10, 2019 w37d253, at 1:36 PM, Geert Janssens 
>  wrote:
> 
> 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
>>>  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
>  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))
> 
> whic

Re: [GNC] Can't seem to load custom reports

2019-09-10 Thread Geert Janssens
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
> >  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
> >>>  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’

Re: [GNC] Can't seem to load custom reports

2019-09-10 Thread Adrien Monteleone
See my other reply on how to get meaningful info in the terminal.

When a report fails, it will prevent loading of all reports in that 
config-user.scm file.

You can comment individual load lines out with an initial semicolon like so:

;(load (gnc-build-userdata-path "John-Report.scm”))

And that line will not be parsed.

I would test each report one by one. Then start testing with those that don’t 
fail together adding one at a time. Check your terminal output on each run.

If your John-Report.scm is fine it should load along with the 
consolidate-transactions report from Doug. (you also need a load line, and the 
file, concerning gnctimeperiod-utilities for that report)

Of course, if your desired reports match any in the list I provided in my 
second post, you already know those won’t work, so no need to test them.

Regards,
Adrien


> On Sep 10, 2019 w37d253, at 9:39 AM, John Morris  wrote:
> 
> 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_reports. 
> 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

___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] Can't seem to load custom reports

2019-09-10 Thread 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 
>  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_reports
>> . 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
>>>  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 inc

Re: [GNC] Can't seem to load custom reports

2019-09-10 Thread Geert Janssens
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_reports
> . 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
> >  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@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-user mailing list
gnucash-user@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.


Re: [GNC] Can't seem to load custom reports

2019-09-10 Thread 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_reports. 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 
>  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@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.


Re: [GNC] Can't seem to load custom reports

2019-09-09 Thread Adrien Monteleone
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.

> On Sep 9, 2019 w37d252, at 3:55 PM, Adrien Monteleone 
>  wrote:
> 
> Spurred by another thread concerning carrying over custom reports from 2.6.x 
> to 3.x, I finally decided to get around to doing the same for my own. I’ve 
> grabbed several reports from the mailing list over the years that I was 
> testing and playing with from 2.6.x and would like to get them working again.
> 
> I’m on Mojave.
> 
> The reports are stored in:
> 
> /HOME/Library/Application Support/GnuCash
> 
> I have a config-user.scm file there as well.
> 
> I’ve tried three different syntaxes of the ‘load’ directive in that file. 
> Following is each method along with TraceFile output for each:
> 
> -
> #1 - escaping the [space] in the path
> 
> (load (/Users/adrien/Library/Application\ Support/GnuCash 
> “my-various-report.scm”))
> 
> TraceFile:
> 
> * 14:31:17  WARN10 (apply-smob/1 # 10e67c300>)
> In c-interface.scm:
> 22:4  9 (gnc:call-with-error-handling _ _)
> In ice-9/boot-9.scm:
>829:9  8 (catch #t # …)
> In c-interface.scm:
>27:37  7 (_)
> In unknown file:
>   6 (eval-string "(load (/Users/adrien/Library/Application…" …)
> In ice-9/boot-9.scm:
>   2312:4  5 (save-module-excursion #)
> In ice-9/eval-string.scm:
> 38:6  4 (read-and-eval # #:lang _)
> In ice-9/eval.scm:
>159:9  3 (_ #f)
>   196:27  2 (_ #f)
>   223:20  1 (proc #)
> In unknown file:
>   0 (%resolve-variable (7 . #) #)
> 
> Unbound variable: /Users/adrien/Library/Application\
> * 14:31:43 ERROR  g_object_ref: assertion 'G_IS_OBJECT 
> (object)' failed
> * 14:31:43 ERROR  g_object_ref: assertion 'G_IS_OBJECT 
> (object)’ failed
> 
> -
> #2 - quoting the [space] in the path
> 
> (load ("/Users/adrien/Library/Application Support/GnuCash" 
> “my-various-report.scm”))
> 
> TraceFile:
> 
> * 14:35:51  WARN 8 (apply-smob/1 # 11107a320>)
> In c-interface.scm:
> 22:4  7 (gnc:call-with-error-handling _ _)
> In ice-9/boot-9.scm:
>829:9  6 (catch #t # …)
> In c-interface.scm:
>27:37  5 (_)
> In unknown file:
>   4 (eval-string "(load (\"/Users/adrien/Library/Applicati…" …)
> In ice-9/boot-9.scm:
>   2312:4  3 (save-module-excursion #)
> In ice-9/eval-string.scm:
> 38:6  2 (read-and-eval # #:lang _)
> In ice-9/eval.scm:
>159:9  1 (_ #f)
> In unknown file:
>   0 (_ "gnctimeperiod-utilities.scm")
> 
> Wrong type to apply: "/Users/adrien/Library/Application Support/GnuCash”
> 
> -
> #3 - direct full path
> 
> (load "/Users/adrien/Library/Application 
> Support/GnuCash/my-various-report.scm”)
> 
> 
> TraceFile:
> 
> 
> * 14:38:58  WARN  In c-interface.scm:
> 22:4 19 (gnc:call-with-error-handling _ _)
> In ice-9/boot-9.scm:
>829:9 18 (catch _ _ # …)
> In c-interface.scm:
>27:37 17 (_)
> In unknown file:
>  16 (eval-string "(load \"/Users/adrien/Library/Applicatio…" …)
> In ice-9/boot-9.scm:
>   2312:4 15 (save-module-excursion _)
> In ice-9/eval-string.scm:
> 38:6 14 (read-and-eval # #:lang _)
> In ice-9/boot-9.scm:
>   2312:4 13 (save-module-excursion #)
>  3832:10 12 (_)
>   1693:5 11 (%start-stack load-stack _)
>   1695:9 10 (_)
> In unknown file:
>   9 (primitive-load "/Users/adrien/Library/Application Supp…")
> In ice-9/eval.scm:
>   721:20  8 (primitive-eval (use-modules (gnucash main)))
> In ice-9/psyntax.scm:
>  1235:36  7 (expand-top-sequence ((use-modules (gnucash main))) _ _ …)
>  1182:24  6 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
>   285:10  5 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
> In ice-9/boot-9.scm:
>  3377:20  4 (process-use-modules _)
>   222:17  3 (map1 (((gnucash main
>  3378:31  2 (_ ((gnucash main)))
>   2803:6  1 (resolve-interface _ #:select _ #:hide _ #:prefix _ # 

[GNC] Can't seem to load custom reports

2019-09-09 Thread Adrien Monteleone
Spurred by another thread concerning carrying over custom reports from 2.6.x to 
3.x, I finally decided to get around to doing the same for my own. I’ve grabbed 
several reports from the mailing list over the years that I was testing and 
playing with from 2.6.x and would like to get them working again.

I’m on Mojave.

The reports are stored in:

/HOME/Library/Application Support/GnuCash

I have a config-user.scm file there as well.

I’ve tried three different syntaxes of the ‘load’ directive in that file. 
Following is each method along with TraceFile output for each:

-
#1 - escaping the [space] in the path

(load (/Users/adrien/Library/Application\ Support/GnuCash 
“my-various-report.scm”))

TraceFile:

* 14:31:17  WARN10 (apply-smob/1 #)
In c-interface.scm:
 22:4  9 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
829:9  8 (catch #t # …)
In c-interface.scm:
27:37  7 (_)
In unknown file:
   6 (eval-string "(load (/Users/adrien/Library/Application…" …)
In ice-9/boot-9.scm:
   2312:4  5 (save-module-excursion #)
In ice-9/eval-string.scm:
 38:6  4 (read-and-eval # #:lang _)
In ice-9/eval.scm:
159:9  3 (_ #f)
   196:27  2 (_ #f)
   223:20  1 (proc #)
In unknown file:
   0 (%resolve-variable (7 . #) #)

Unbound variable: /Users/adrien/Library/Application\
* 14:31:43 ERROR  g_object_ref: assertion 'G_IS_OBJECT (object)' 
failed
* 14:31:43 ERROR  g_object_ref: assertion 'G_IS_OBJECT (object)’ 
failed

-
#2 - quoting the [space] in the path

(load ("/Users/adrien/Library/Application Support/GnuCash" 
“my-various-report.scm”))

TraceFile:

* 14:35:51  WARN 8 (apply-smob/1 #)
In c-interface.scm:
 22:4  7 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
829:9  6 (catch #t # …)
In c-interface.scm:
27:37  5 (_)
In unknown file:
   4 (eval-string "(load (\"/Users/adrien/Library/Applicati…" …)
In ice-9/boot-9.scm:
   2312:4  3 (save-module-excursion #)
In ice-9/eval-string.scm:
 38:6  2 (read-and-eval # #:lang _)
In ice-9/eval.scm:
159:9  1 (_ #f)
In unknown file:
   0 (_ "gnctimeperiod-utilities.scm")

Wrong type to apply: "/Users/adrien/Library/Application Support/GnuCash”

-
#3 - direct full path

(load "/Users/adrien/Library/Application Support/GnuCash/my-various-report.scm”)


TraceFile:


* 14:38:58  WARN  In c-interface.scm:
 22:4 19 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
829:9 18 (catch _ _ # …)
In c-interface.scm:
27:37 17 (_)
In unknown file:
  16 (eval-string "(load \"/Users/adrien/Library/Applicatio…" …)
In ice-9/boot-9.scm:
   2312:4 15 (save-module-excursion _)
In ice-9/eval-string.scm:
 38:6 14 (read-and-eval # #:lang _)
In ice-9/boot-9.scm:
   2312:4 13 (save-module-excursion #)
  3832:10 12 (_)
   1693:5 11 (%start-stack load-stack _)
   1695:9 10 (_)
In unknown file:
   9 (primitive-load "/Users/adrien/Library/Application Supp…")
In ice-9/eval.scm:
   721:20  8 (primitive-eval (use-modules (gnucash main)))
In ice-9/psyntax.scm:
  1235:36  7 (expand-top-sequence ((use-modules (gnucash main))) _ _ …)
  1182:24  6 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
   285:10  5 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
In ice-9/boot-9.scm:
  3377:20  4 (process-use-modules _)
   222:17  3 (map1 (((gnucash main
  3378:31  2 (_ ((gnucash main)))
   2803:6  1 (resolve-interface _ #:select _ #:hide _ #:prefix _ # _ …)
In unknown file:
   0 (scm-error misc-error #f "~A ~S" ("no code for modu…" …) …)

no code for module (gnucash main)

-
I noticed for #2 & #3 that quoting the path has `load` wanting to insert a “\” 
before it, or at least that’s what it looks like. (see #2 line 4 and #3 line 16)

#1 wants to truncate the path at the escape for the space.

#3 appears to get further along in loading. Perhaps there is a problem with one 
of the reports? Unfortunately, the TraceFile doesn’t seem to indicate which one.

Thoughts, ideas? Am I missing something or have a syntax error I’m not seeing? 
Do I just have to test them one by one to find the culprit?

Thanks.

Regards,
Adrien



___
gnucash-user mailing list
gnucash-user@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.