rgbkrk: We'll want to get a patch release out for this pretty quick, records are generally broken right now.
rgbkrk: Weird that the push is failing, though it looks like we should be mocking the kernelspec lookup.
rgbkrk: I've re-kicked the one failing job since everything else passes.
codecov[bot]: # [Codecov](https://codecov.io/gh/nteract/papermill/pull/81?src=pr&el=h1) Report
> Merging [#81](https://codecov.io/gh/nteract/papermill/pull/81?src=pr&el=desc) into [master](https://codecov.io/gh/nteract/papermill/commit/f3eb72e0db1cdf4ddf2d99ddfa38615b30c97e7e?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `16.66%`.



```diff
@@           Coverage Diff           @@
##           master      #81   +/-   ##
=======================================
  Coverage   54.97%   54.97%           
=======================================
  Files           8        8           
  Lines         864      864           
=======================================
  Hits          475      475           
  Misses        389      389
```

rgbkrk: Added a basic test that really just verifies that the papermill record payload is passed through correctly.
rgbkrk: /cc @willingc 
diff --git a/papermill/api.py b/papermill/api.py
index 15b2745..8f68c88 100644
--- a/papermill/api.py
+++ b/papermill/api.py
@@ -32,7 +32,7 @@ def record(name, value):
     """
     # IPython.display.display takes a tuple of objects as first parameter
     # `http://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html#IPython.display.display`
-    ip_display(({RECORD_OUTPUT_TYPE: {name: value}},), raw=True)
+    ip_display(data={RECORD_OUTPUT_TYPE: {name: value}}, raw=True)
 
 
 def display(name, obj):
@@ -46,7 +46,7 @@ def display(name, obj):
     """
     data, metadata = IPython.core.formatters.format_display_data(obj)
     metadata['papermill'] = dict(name=name)
-    ip_display(data, metadata=metadata, raw=True)
+    ip_display(data=data, metadata=metadata, raw=True)
 
 
 def read_notebook(path):
@@ -171,7 +171,7 @@ class Notebook(object):
             raise PapermillException(
                 "Output Name '%s' is not available in this notebook.")
         output = outputs[name]
-        ip_display(output.data, metadata=output.metadata, raw=True)
+        ip_display(data=output.data, metadata=output.metadata, raw=True)
 
 
 def _get_papermill_metadata(nb, name, default=None):
@@ -245,11 +245,11 @@ class NotebookCollection(object):
     def display_output(self, key, output_name):
         """Display markdown of output"""
         if isinstance(key, string_types):
-            ip_display((Markdown("### %s" % str(key)),))
+            ip_display(Markdown("### %s" % str(key)))
             self[key].display_output(output_name)
         else:
             for i, k in enumerate(key):
                 if i > 0:
-                    ip_display((Markdown("<hr>"),))  # tag between outputs
-                ip_display((Markdown("### %s" % str(k)),))
+                    ip_display(Markdown("<hr>"))  # tag between outputs
+                ip_display(Markdown("### %s" % str(k)))
                 self[k].display_output(output_name)

Error on record() with new versions
Versions above 0.11 seems to present an error when running the record() function.
As the example on the readme file:

```python-traceback
"""notebook.ipynb"""
import papermill as pm

pm.record("hello", "world")
pm.record("number", 123)
pm.record("some_list", [1, 3, 5])
pm.record("some_dict", {"a": 1, "b": 2})`

gives:
`---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-20-447d49aec58c> in <module>()
      2 import papermill as pm
      3 
----> 4 pm.record("hello", "world")
      5 pm.record("number", 123)
      6 pm.record("some_list", [1, 3, 5])

~\Anaconda3\envs\mestrado\lib\site-packages\papermill\api.py in record(name, value)
     33     # IPython.display.display takes a tuple of objects as first parameter
     34     # `http://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html#IPython.display.display`
---> 35     ip_display(({RECORD_OUTPUT_TYPE: {name: value}},), raw=True)
     36 
     37 

~\Anaconda3\envs\mestrado\lib\site-packages\IPython\core\display.py in display(include, exclude, metadata, transient, display_id, *objs, **kwargs)
    293     for obj in objs:
    294         if raw:
--> 295             publish_display_data(data=obj, metadata=metadata, **kwargs)
    296         else:
    297             format_dict, md_dict = format(obj, include=include, exclude=exclude)

~\Anaconda3\envs\mestrado\lib\site-packages\IPython\core\display.py in publish_display_data(data, metadata, source, transient, **kwargs)
    118         data=data,
    119         metadata=metadata,
--> 120         **kwargs
    121     )
    122 

~\Anaconda3\envs\mestrado\lib\site-packages\ipykernel\zmqshell.py in publish(self, data, metadata, source, transient, update)
    115         if transient is None:
    116             transient = {}
--> 117         self._validate_data(data, metadata)
    118         content = {}
    119         content['data'] = encode_images(data)

~\Anaconda3\envs\mestrado\lib\site-packages\IPython\core\displaypub.py in _validate_data(self, data, metadata)
     48 
     49         if not isinstance(data, dict):
---> 50             raise TypeError('data must be a dict, got: %r' % data)
     51         if metadata is not None:
     52             if not isinstance(metadata, dict):

TypeError: data must be a dict, got: {'application/papermill.record+json': {'hello': 'world'}}`

```
diff --git a/papermill/tests/test_api.py b/papermill/tests/test_api.py
index a03710a..4fc1883 100644
--- a/papermill/tests/test_api.py
+++ b/papermill/tests/test_api.py
@@ -9,7 +9,7 @@ else:
 import pandas as pd
 from pandas.util.testing import assert_frame_equal
 
-from .. import display, read_notebook, read_notebooks, PapermillException
+from .. import display, read_notebook, read_notebooks, PapermillException, record
 from ..api import Notebook
 from . import get_notebook_path, get_notebook_dir
 
@@ -91,4 +91,11 @@ def test_display(format_display_data_mock, ip_display_mock):
     display('display_name', {'display_obj': 'hello'})
 
     format_display_data_mock.assert_called_once_with({'display_obj': 'hello'})
-    ip_display_mock.assert_called_once_with({'foo': 'bar'}, metadata={'metadata': 'baz', 'papermill': {'name': 'display_name'}}, raw=True)
+    ip_display_mock.assert_called_once_with(data={'foo': 'bar'}, metadata={'metadata': 'baz', 'papermill': {'name': 'display_name'}}, raw=True)
+
+
+
+@patch('papermill.api.ip_display')
+def test_record(ip_display_mock):
+    record('a', 3)
+    ip_display_mock.assert_called_once_with(data={'application/papermill.record+json': {'a': 3}}, raw=True)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov
3.6
requirements.txt requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
ansiwrap==0.8.4
async-generator==1.10
attrs==22.2.0
backcall==0.2.0
bleach==4.1.0
boto3==1.23.10
botocore==1.26.10
certifi==2021.5.30
charset-normalizer==2.0.12
click==8.0.4
codecov==2.1.13
coverage==6.2
decorator==5.1.1
defusedxml==0.7.1
entrypoints==0.4
idna==3.10
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
ipython==7.16.3
ipython-genutils==0.2.0
jedi==0.17.2
Jinja2==3.0.3
jmespath==0.10.0
jsonschema==3.2.0
jupyter-client==7.1.2
jupyter-core==4.9.2
jupyterlab-pygments==0.1.2
MarkupSafe==2.0.1
mistune==0.8.4
nbclient==0.5.9
nbconvert==6.0.7
nbformat==5.1.3
nest-asyncio==1.6.0
numpy==1.19.5
packaging==21.3
pandas==1.1.5
pandocfilters==1.5.1
-e git+https://github.com/nteract/papermill.git@f3eb72e0db1cdf4ddf2d99ddfa38615b30c97e7e#egg=papermill
parso==0.7.1
pexpect==4.9.0
pickleshare==0.7.5
pluggy==1.0.0
prompt-toolkit==3.0.36
ptyprocess==0.7.0
py==1.11.0
Pygments==2.14.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
pytest-cov==4.0.0
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
pyzmq==25.1.2
requests==2.27.1
s3transfer==0.5.2
six==1.17.0
testpath==0.6.0
textwrap3==0.9.2
tomli==1.2.3
tornado==6.1
tqdm==4.64.1
traitlets==4.3.3
typing_extensions==4.1.1
urllib3==1.26.20
wcwidth==0.2.13
webencodings==0.5.1
zipp==3.6.0

name: papermill
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - ansiwrap==0.8.4
      - async-generator==1.10
      - attrs==22.2.0
      - backcall==0.2.0
      - bleach==4.1.0
      - boto3==1.23.10
      - botocore==1.26.10
      - charset-normalizer==2.0.12
      - click==8.0.4
      - codecov==2.1.13
      - coverage==6.2
      - decorator==5.1.1
      - defusedxml==0.7.1
      - entrypoints==0.4
      - idna==3.10
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - jedi==0.17.2
      - jinja2==3.0.3
      - jmespath==0.10.0
      - jsonschema==3.2.0
      - jupyter-client==7.1.2
      - jupyter-core==4.9.2
      - jupyterlab-pygments==0.1.2
      - markupsafe==2.0.1
      - mistune==0.8.4
      - nbclient==0.5.9
      - nbconvert==6.0.7
      - nbformat==5.1.3
      - nest-asyncio==1.6.0
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - pandocfilters==1.5.1
      - parso==0.7.1
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pluggy==1.0.0
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - py==1.11.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - pyzmq==25.1.2
      - requests==2.27.1
      - s3transfer==0.5.2
      - six==1.17.0
      - testpath==0.6.0
      - textwrap3==0.9.2
      - tomli==1.2.3
      - tornado==6.1
      - tqdm==4.64.1
      - traitlets==4.3.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - zipp==3.6.0
prefix: /opt/conda/envs/papermill

papermill/tests/test_api.py::test_display papermill/tests/test_api.py::test_record
papermill/tests/test_api.py::TestNotebookClass::test papermill/tests/test_api.py::TestNotebookClass::test_bad_file_ext papermill/tests/test_api.py::TestNotebookClass::test_path_without_node papermill/tests/test_api.py::TestNotebookCollection::test
papermill/api.py
papermill/api.py