Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hex code in a traceback
#1
What does the hex code in a Python traceback mean?

For example, the following traceback is from accessing an out of bounds list index:

In [19]: c[100]
-------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-18-9a31ea1e1a13> in <module>()
----> 1 c[100]

IndexError: list index out of range

What is "9a31ea1e1a13"?
Reply
#2
Please, post the entire traceback that you get. We need to see the whole thing. Do not just give us the one/last line. Take a time to read What to include in a post
If you post your code in code tags would also help
Reply
#3
(Oct-13-2017, 03:36 PM)insearchofanswers87 Wrote: What is "9a31ea1e1a13"?
It's a internal generated number bye IPython,so has nothing to about the code.
So just ignore it.
In [1]: l = [1,2,3]
In [2]: l[2]
Out[2]: 3

In [3]: l[3]
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-3-bb49eeb9f0db> in <module>()
----> 1 l[3]

IndexError: list index out of range
Reply
#4
@buran Thanks for responding. That is the entire traceback. This is from an IPython interactive session.

I know that this is some sort of internal IPython generated hex value. I am just trying to understand it's purpose. I need to teach this to beginning programmers--they'll choke when they see something like that.
Reply
#5
I guess is this.
Top-level structure
"signature": "hex-digest", # used for authenticating unsafe outputs on load
Reply
#6
I don't think that's it snippsat.
Reply
#7
insearchofanswers87 Wrote:I don't think that's it snippsat.
Maybe not,ask on question on repo there they know.
(Oct-14-2017, 03:25 PM)insearchofanswers87 Wrote: I am just trying to understand it's purpose. I need to teach this to beginning programmers--they'll choke when they see something like that.
I can not understand why it should be problem to tell that it's auto generated internal message of IPython,
that has nothing to do about the code they writing,so just ignore it.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020