What is __shedskin__::ValueError*' ?

14 views
Skip to first unread message

Sans

unread,
Jun 6, 2011, 11:22:26 AM6/6/11
to shedskin-discuss
What is this error mean?

terminate called after throwing an instance of
'__shedskin__::ValueError*'
Aborted

The complied version is being aborted throwing in this error.

Cheers,
San

Fahrzin Hemmati

unread,
Jun 6, 2011, 11:24:29 AM6/6/11
to shedskin...@googlegroups.com
Your original program probably has an error in the same place. I always
get that whenever I don't test my extensions properly, I compile to C++
and lose the traceback. If you have the latest git, you could add -x to
get the (C++) traceback of the error.

--fahhem

Mark Dufour

unread,
Jun 6, 2011, 11:24:53 AM6/6/11
to shedskin...@googlegroups.com

hmm, you don't get this when running the program with cpython..?

if you can use shedskin GIT, you might want to try the new shedskin -x option. it will tell you, just like python, where the Exception was thrown exactly. if it's still not clear, you could send me the output. or you can send me your current program, and I can have a look.

thanks,
mark.
--
http://www.youtube.com/watch?v=E6LsfnBmdnk

Sans

unread,
Jun 6, 2011, 11:44:20 AM6/6/11
to shedskin-discuss
Hi fahhem,

One of users reported this error but for me it just fine. So, that
rules out the "error in original program" theory - isn't it? Or there
could be some race conditions?

-San

Sans

unread,
Jun 6, 2011, 11:48:07 AM6/6/11
to shedskin-discuss


On Jun 6, 4:24 pm, Mark Dufour <mark.duf...@gmail.com> wrote:
> On Mon, Jun 6, 2011 at 5:22 PM, Sans <r.santanu....@gmail.com> wrote:
> > What is this error mean?
>
> > terminate called after throwing an instance of
> > '__shedskin__::ValueError*'
> > Aborted
>
> > The complied version is being aborted throwing in this error.
>
> hmm, you don't get this when running the program with cpython..?
>
Using "pycheaker", I just get these:

torque_history.py:151: No class attribute (strptime) found
torque_history.py:243: Local variable (jGrp) not used
torque_history.py:418: No global (all) found


>
> if you can use shedskin GIT,
>
Well, silly question: How can I use the GIT?

-San

Sans

unread,
Jun 6, 2011, 5:00:26 PM6/6/11
to shedskin-discuss


On Jun 6, 4:24 pm, Mark Dufour <mark.duf...@gmail.com> wrote:
>
> if you can use shedskin GIT, you might want to try the new shedskin -x
> option.
>
Using the new GIT now. Used the "-x" option bit don't see any
backtrace information:

[root@vmtest2 shedskin]# python __init__.py -x torque_history.py
*** SHED SKIN Python-to-C++ Compiler 0.8 ***
Copyright 2005-2010 Mark Dufour; License GNU GPL version 3 (See
LICENSE)

[analyzing types..]
********************************100%
[generating c++ code..]
*WARNING* torque_history.py:128: function file_date not called!
*WARNING* torque_history.py:399: variable 'm' has no type
[root@vmtest2 shedskin]#


Any other suggestion?

-San

Mark Dufour

unread,
Jun 7, 2011, 10:01:30 AM6/7/11
to shedskin...@googlegroups.com
>
Using the new GIT now. Used the "-x" option bit don't see any
backtrace information:


shedskin -x adds backtrace code to the resulting program, so if that one stops with a ValueError, you can see where exactly it was raised. consider this test program:


def wof():
    int('hoppa')

def waf():
    wof()

waf()

shedskin test && make && ./test gives this:


terminate called after throwing an instance of '__shedskin__::ValueError*'
Aborted

(hmm we should probably print the exception message here, too.. I will have a look at that for 0.8)

but shedskin -x test && make && ./test gives this:

stack trace:
  ./test : __shedskin__::Exception::Exception(__shedskin__::str*)+0x9
  ./test : __shedskin__::StandardError::StandardError(__shedskin__::str*)+0x9
  ./test : __shedskin__::ValueError::ValueError(__shedskin__::str*)+0x9
  ./test : __shedskin__::__int(__shedskin__::str*, int)+0x96
  ./test : __test__::wof()+0x10
  ./test : __test__::waf()+0x9
  ./test : __shedskin__::__start(void (*)())+0x3
  ./test : main()+0x13
  /lib/x86_64-linux-gnu/libc.so.6 : __libc_start_main()+0xff
  ./test() [0x41faa9]

terminate called after throwing an instance of '__shedskin__::ValueError*'
Aborted

so you can see the ValueError happened in the 'wof' function.

shedskin -x does make programs slower, but it may be useful during testing.


thanks,
mark.
--
http://www.youtube.com/watch?v=E6LsfnBmdnk

Reply all
Reply to author
Forward
0 new messages