[Eric] traceback in Eric5

Detlev Offenbach detlev at die-offenbachs.de
Wed Apr 6 19:01:13 BST 2011


Hello,

I have no idea what is happening on your system. I entered your script over 
here and ran it through the debugger. Everything worked fine. If anybody else 
has seen this or can reproduce it, please help.

Detlev 

On Mittwoch, 6. April 2011, Janwillem van Dijk wrote:
> Thanks again, no that makes no difference. I have installed according to
> "About Eric": 5.1.1 (rev d440a0f219d4) on Ubuntu 10.10. I have attached
> the new .ini debugger sections. I must confess that I am for 90% or more
> a numpy, scipy, matplotlib user and as such quite out of my depth here.
> 
> When I move the zero div to a function in a separate divzero.py file:
> #!/usr/bin/env python3
> import traceback
> def divzero():
>      return 1/0
> 
> if __name__ == '__main__':
>      try:
>          nonsense = divzero()
>      except:
>          traceback.print_exc()
>      print('finished')
> 
> then the traceback becomes:
> Python 3.1.2 (release31-maint, Sep 17 2010, 20:34:23)
> [GCC 4.4.5] on fjw-laptop, Standard
> 
>  >>> 3.1.2 (release31-maint, Sep 17 2010, 20:34:23)
> 
> [GCC 4.4.5]
> Traceback (most recent call last):
>    File "<string>", line 8, in <module>
>    File "divzero.py", line 4, in divzero
>      return 1/0
> ZeroDivisionError: int division or modulo by zero
> 
> Starting zerodiv.py on its own in eric5 gives again: File <string>, line
> 4 etcetra. Again, running from a console gives the correct traceback.
> 
> On 04/06/2011 06:59 PM, Detlev Offenbach wrote:
> > Please disable the use of a custom Python3 interpreter and report back,
> > if that changes anything.
> > 
> > On Mittwoch, 6. April 2011, Janwillem van Dijk wrote:
> >> Thanks for looking into this. I made an attempt to have all settings in
> >> eric5 as I have them in eric4. I have attached the debugger parts of the
> >> two ini files. The one difference I see is TracePython=false; I changed
> >> that but that makes no difference. I do hope it helps in solving my
> >> problem. What am I overlooking?
> >> Cheers, Janwillem
> >> 
> >> On 04/05/2011 06:41 PM, Detlev Offenbach wrote:
> >>> On Dienstag, 5. April 2011, Janwillem van Dijk wrote:
> >>>> When I manage to get an error in my python3 script and run it from
> >>>> within Eric5 the traceback is not what I expect and makes the
> >>>> debug-viewer useless. A simple example:
> >>>> #!/usr/bin/env python3
> >>>> import sys, traceback
> >>>> print(sys.version)
> >>>> 
> >>>> try:
> >>>>        print(10/0)
> >>>> 
> >>>> except:
> >>>>        traceback.print_exc()
> >>>> 
> >>>> This returns in the debug-view:
> >>>> 3.1.2 (release31-maint, Sep 17 2010, 20:34:23)
> >>>> [GCC 4.4.5]
> >>>> 
> >>>> Traceback (most recent call last):
> >>>>      File "<string>", line 8, in<module>
> >>>> 
> >>>> ZeroDivisionError: int division or modulo by zero
> >>>> 
> >>>> There appears a new empty tab in the IDE named<string>.
> >>>> 
> >>>> Running the script in a terminal gives the expected output:
> >>>> 3.1.2 (release31-maint, Sep 17 2010, 20:34:23)
> >>>> [GCC 4.4.5]
> >>>> 
> >>>> Traceback (most recent call last):
> >>>>      File "./sys_version.py", line 8, in<module>
> >>>>      
> >>>>        print(10/0)
> >>>> 
> >>>> ZeroDivisionError: int division or modulo by zero
> >>>> 
> >>>> Where should I look for any mistakes?
> >>>> Thanks, Janwillem
> >>>> 
> >>>> _______________________________________________
> >>>> Eric mailing list
> >>>> Eric at riverbankcomputing.com
> >>>> http://www.riverbankcomputing.com/mailman/listinfo/eric
> >>> 
> >>> That script behaves as expected over here. eric pops up a dialog with a
> >>> report about the exception and the question what to do. If possible
> >>> send more details of your debugger settings.
> >>> 
> >>> Detlev


-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the Eric mailing list