piecharts borken r19279

Herbert Thoma herbert.thoma at iis.fraunhofer.de
Sun Jun 20 05:04:17 EDT 2010


Herbert Thoma wrote:
> Now I have a more serious problem and I am not sure if it is
> realated. I updated from svn and was able to start GnuCash one
> time. Piecharts still did not work but I got a different backtrace,
> see below.
> 
> Next time I tried to start GnuCash I got a message box:
> 
> Ein Bericht hat eine Identifikationsnummer (»report-guid«), die doppelt auftritt.
> Bitte prüfen Sie, ob folgende »report-guid« fälschlicherweise in den gespeicherten
> Berichten mehr als ein Mal auftritt: e1bd09b8a1dd49dd85760db9d82b045c
> 
> I get a total of 4 of these boxes with different report-guids.
> 
> Most puzzling is, that I get these message boxes even if I start
> with the --nofile option.

OK, I found the causo of this problem: I tried to hack a little on
account-piecharts.scm directly in
/usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/.
This left me with account-piecharts.scm~ (the backup file) in the
standard-reports directory.

Obviously there is some for-each file in directory logic there which
got screwed up by the backup file. It might be a good idea to
explicitly list the files to load somewhere, wouldn't it?

> Where shall I look for this report-guid? I already deleted my .gnucash
> directory.
> 
> Christian Stimming wrote:
>> Am Saturday 19 June 2010 schrieb Herbert Thoma:
>>> Hi,
>>>
>>> after updating from svn piecharts are broken for me.
>>> Piecharts worked before, the last update was about a week ago.
>> That one goes on me (r19253, r19252), sorry for that. I hope I have disabled 
>> enough the new feature now (in r19280). Seems to me I might still have messed 
>> up the Scheme case-syntax in date-utilities.scm, 
> 
> The first time I started GnuCash after the svn up I got this backtrace:
> 
> <...>
>  650: 16  (let* (# # # #) (if # # #) (gnc:report-set-ctext! report html) ...)
>  652: 17* [#<procedure #f #> #]
> In /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:
>  538: 18  [piechart-renderer # "Expense Accounts" ...]
>     ...
>  257: 19  (let* (# # # # ...) (define # #) (define # #) ...)
>  281: 20* (case averaging-selection (# #) (# #) ...)
> /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:281:13: In procedure memoization in expression (case averaging-selection (# #) ...):
> /usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm:281:13: In file "/usr/local/share/gnucash/guile-modules/gnucash/report/standard-reports/account-piecharts.scm", line 280: Bad case labels #@else in expression (case averaging-selection ((quote YearDelta) (string-append report-title " " (_ "Yearly Average"))) ((quote MonthDelta) (string-append report-title " " (_ "Monthly Average"))) ((quote WeekDelta) (string-append report-title " " (_ "Weekly Average"))) (#@else report-title)).
> 
> 
>> (define (gnc:date-get-fraction-func interval)
>>   (case interval
>>     ('YearDelta gnc:date-to-year-fraction)
>>     ('MonthDelta gnc:date-to-month-fraction)
>>     ('WeekDelta gnc:date-to-week-fraction)
>>     ('DayDelta gnc:date-to-day-fraction)
>>     (else #f)))
>>
>> and my intention was that if "interval" has the value #f or 'None, this 
>> statement should return #f, but for the four other symbols it should return 
>> the values of the other variables. However, the error message indicates this 
>> isn't the correct syntax for the else-branch if "interval" had the value 'None 
>> :
>>
>>> In file
>>> "/usr/local/share/gnucash/scm/date-utilities.scm", line 191: Bad case
>>> labels #@else in expression (case interval ((quote YearDelta)
>>> gnc:date-to-year-fraction) ((quote MonthDelta) gnc:date-to-month-fraction)
>>> ((quote WeekDelta) gnc:date-to-week-fraction) ((quote DayDelta)
>>> gnc:date-to-day-fraction) (#@else #f)). 
>> Some Scheme help, anyone?
>>
>> Thanks!
>>
>> Christian
>>
> 

-- 
Herbert Thoma
Dipl.-Ing., MBA
Head of Video Group
Multimedia Realtime Systems Department
Fraunhofer IIS
Am Wolfsmantel 33, 91058 Erlangen, Germany
Phone: +49-9131-776-6130
Fax:   +49-9131-776-6099
email: tma at iis.fhg.de
www: http://www.iis.fhg.de/


More information about the gnucash-devel mailing list