Zim

Comment 2 for bug 1555111

Revision history for this message
Keeyan Nejad (keeyan-nejad) wrote : Re: [Bug 1555111] [NEW] Arithmetic now working

Hi,

This happens to every calculation I try to do regardless of complexity.
But it only happens on a few pages. An example being the page I have
attached

Thanks,
Keeyan.

On 10/03/16 11:53, Jaap Karssenberg wrote:
> Looks like you have a formula that arithmic can not parse. Can you add the
> content of the page that triggers this error ?
>
> THanks,
>
> Jaap
>
> On Wed, Mar 9, 2016 at 2:45 PM, ESDACIO44 <email address hidden>
> wrote:
>
>> Public bug reported:
>>
>> Whenever I try to make a calculation with the arithmetic plugin I get a
>> popup saying I found a bug and tells me to include this info:
>>
>> This is zim 0.65
>> Platform: posix
>> Locale: en_GB UTF-8
>> FS encoding: UTF-8
>> Python: (2, 7, 10, 'final', 0)
>> Gtk: (2, 24, 29)
>> Pygtk: (2, 24, 0)
>> Zim revision is:
>> branch: zim-trunk
>> revision: 805 <email address hidden>
>> date: 2015-11-01 15:42:45 +0100
>>
>> ======= Traceback =======
>> File "/usr/lib/python2.7/site-packages/zim/actions.py", line 109, in func
>> self.func(instance, *arg, **kwarg)
>> File "/usr/lib/python2.7/site-packages/zim/plugins/arithmetic.py", line
>> 53, in calculate
>> parser.parse( buf )
>> File "/usr/lib/python2.7/site-packages/zim/inc/arithmetic.py", line 469,
>> in parse
>> self.parseLine( i, textBuffer, variables=self.variables,
>> functions=self.functions )
>> File "/usr/lib/python2.7/site-packages/zim/inc/arithmetic.py", line 392,
>> in parseLine
>> variables=variables, functions=functions ) )
>> File "/usr/lib/python2.7/site-packages/zim/inc/arithmetic.py", line 243,
>> in evaluate
>> return AddCommas( safe_eval( ''.join( expressionD ) ) )
>> File "/usr/lib/python2.7/site-packages/zim/inc/arithmetic.py", line 139,
>> in safe_eval
>> re = eval(expression, GLOBALS, {'Decimal': Decimal})
>> SyntaxError: invalid syntax (<string>, line 1)
>>
>> I am using a Thinkpad Yoga running Fedora 23 with cinnamon
>>
>> ** Affects: zim
>> Importance: Undecided
>> Status: New
>>
>>
>> ** Tags: arithmetic
>>
>> --
>> You received this bug notification because you are subscribed to Zim.
>> https://bugs.launchpad.net/bugs/1555111
>>
>> Title:
>> Arithmetic now working
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/zim/+bug/1555111/+subscriptions
>>