{"action":"closed","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/15192","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/15192/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/15192/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/15192/events","html_url":"https://github.com/pandas-dev/pandas/issues/15192","id":202400811,"number":15192,"title":"Line breaks in Exception messages","user":{"login":"albertvillanova","id":8515462,"avatar_url":"https://avatars.githubusercontent.com/u/8515462?v=3","gravatar_id":"","url":"https://api.github.com/users/albertvillanova","html_url":"https://github.com/albertvillanova","followers_url":"https://api.github.com/users/albertvillanova/followers","following_url":"https://api.github.com/users/albertvillanova/following{/other_user}","gists_url":"https://api.github.com/users/albertvillanova/gists{/gist_id}","starred_url":"https://api.github.com/users/albertvillanova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertvillanova/subscriptions","organizations_url":"https://api.github.com/users/albertvillanova/orgs","repos_url":"https://api.github.com/users/albertvillanova/repos","events_url":"https://api.github.com/users/albertvillanova/events{/privacy}","received_events_url":"https://api.github.com/users/albertvillanova/received_events","type":"User","site_admin":false},"labels":[{"id":42670965,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Error%20Reporting","name":"Error Reporting","color":"ffa0ff","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-22T18:41:04Z","updated_at":"2017-01-24T18:58:24Z","closed_at":"2017-01-24T18:58:24Z","body":"#### Code Sample, a copy-pastable example if possible\r\n\r\n```python\r\nimport pandas as pd\r\ndf = pd.DataFrame({'a': [1, '2']})\r\ndf.to_hdf('tmp.h5', 'key', format='table')\r\n```\r\n#### Problem description\r\n\r\nI wonder if there is a reason why the exception message contains a line break:\r\n\r\n```\r\nTypeError: Cannot serialize the column [a] because\r\nits data contents are [mixed-integer] object dtype\r\n```\r\n\r\nThe line breaks are explicitly introduced in module pandas/io/pytables.py:\r\n\r\n```\r\nraise TypeError(\r\n    \"Cannot serialize the column [%s] because\\n\"\r\n    \"its data contents are [%s] object dtype\"\r\n    % (item, inferred_type)\r\n)\r\n```\r\n\r\nIt should be noted that besides this message, there are many others exception massages with line breaks in this module.\r\n\r\nI make this question because I am logging the output and I think it would be better to have an event log per line.\r\n\r\n#### Expected Output\r\n\r\n```\r\nTypeError: Cannot serialize the column [a] because its data contents are [mixed-integer] object dtype\r\n```\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\ncommit: None\r\npython: 3.5.1.final.0\r\npython-bits: 64\r\nOS: Linux\r\nOS-release: 3.13.0-107-generic\r\nmachine: x86_64\r\nprocessor: x86_64\r\nbyteorder: little\r\nLC_ALL: None\r\nLANG: ca_ES.UTF-8\r\n\r\npandas: 0.18.0\r\nnose: 1.3.7\r\npip: 8.1.1\r\nsetuptools: 20.3\r\nCython: 0.23.4\r\nnumpy: 1.10.4\r\nscipy: 0.17.0\r\nstatsmodels: 0.6.1\r\nxarray: None\r\nIPython: 4.1.2\r\nsphinx: 1.3.5\r\npatsy: 0.4.0\r\ndateutil: 2.5.1\r\npytz: 2016.2\r\nblosc: None\r\nbottleneck: 1.0.0\r\ntables: 3.2.2\r\nnumexpr: 2.5\r\nmatplotlib: 1.5.1\r\nopenpyxl: 2.3.2\r\nxlrd: 0.9.4\r\nxlwt: 1.0.0\r\nxlsxwriter: 0.8.4\r\nlxml: 3.6.0\r\nbs4: 4.4.1\r\nhtml5lib: None\r\nhttplib2: None\r\napiclient: None\r\nsqlalchemy: 1.0.12\r\npymysql: None\r\npsycopg2: None\r\njinja2: 2.8\r\nboto: 2.39.0\r\n</details>\r\n"}}
{"actor":{"display_login":"jreback"}}