Skip to content

_repr_html_ exception reporting corner case when using type(foo) #4990

Description

@michaelaye reported this in pandas-dev/pandas#6225,
but it seems to be an ipython issues, resulting from the recent #4745.

In [11]: class Foo(object):
    ...:     def _repr_html_(self):
    ...:         return "Me"
    ...: x=Foo()
In [12]: type(x)
/home/user1/src/ipython/IPython/core/formatters.py:199: FormatterWarning: 
Exception in text/html formatter: unbound method _repr_html_() must 
be called with Foo instance as first argument (got nothing instead)
  FormatterWarning,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions