[GNC] Can't seem to load custom reports

Adrien Monteleone adrien.monteleone at lusfiber.net
Mon Sep 9 16:55:20 EDT 2019


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  WARN <gnc.app-utils>           10 (apply-smob/1 #<catch-closure 10e67c300>)
In c-interface.scm:
     22:4  9 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
    829:9  8 (catch #t #<procedure 10f7e4f90 at c-interface.scm:23:…> …)
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 #<procedure 10f7ca560 at ice-9/e…>)
In ice-9/eval-string.scm:
     38:6  4 (read-and-eval #<input: string 110176230> #:lang _)
In ice-9/eval.scm:
    159:9  3 (_ #f)
   196:27  2 (_ #f)
   223:20  1 (proc #<directory (gnucash utilities) 10e9a9b40>)
In unknown file:
           0 (%resolve-variable (7 . #) #<directory (gnucash utiliti…>)

Unbound variable: /Users/adrien/Library/Application\
* 14:31:43 ERROR <GLib-GObject> g_object_ref: assertion 'G_IS_OBJECT (object)' failed
* 14:31:43 ERROR <GLib-GObject> 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 <gnc.app-utils>            8 (apply-smob/1 #<catch-closure 11107a320>)
In c-interface.scm:
     22:4  7 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
    829:9  6 (catch #t #<procedure 11240e330 at c-interface.scm:23:…> …)
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 #<procedure 1120f6a00 at ice-9/e…>)
In ice-9/eval-string.scm:
     38:6  2 (read-and-eval #<input: string 11208de00> #: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 <gnc.app-utils> In c-interface.scm:
     22:4 19 (gnc:call-with-error-handling _ _)
In ice-9/boot-9.scm:
    829:9 18 (catch _ _ #<procedure 1149eac80 at c-interface.scm:28…> …)
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 #<input: string 1167a2bd0> #:lang _)
In ice-9/boot-9.scm:
   2312:4 13 (save-module-excursion #<procedure 118f12180 at ice-9/b…>)
  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





More information about the gnucash-user mailing list