Title: ipython 8+ python crash on exception · Issue #13598 · ipython/ipython · GitHub
Open Graph Title: ipython 8+ python crash on exception · Issue #13598 · ipython/ipython
X Title: ipython 8+ python crash on exception · Issue #13598 · ipython/ipython
Description: Since version 8 in Ipython I frequently - very frequently - get IPython crashes (termination) of the kind below. I think the specific situation is that I edit code, I use autoreload(3), there is a bug, but when IPython tries traceback it...
Open Graph Description: Since version 8 in Ipython I frequently - very frequently - get IPython crashes (termination) of the kind below. I think the specific situation is that I edit code, I use autoreload(3), there is a ...
X Description: Since version 8 in Ipython I frequently - very frequently - get IPython crashes (termination) of the kind below. I think the specific situation is that I edit code, I use autoreload(3), there is a ...
Opengraph URL: https://github.com/ipython/ipython/issues/13598
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ipython 8+ python crash on exception","articleBody":"\u003c!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories. \r\n\r\nIf it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.\r\n\r\nIf you are unsure, it's ok to post here, though, there are few maintainer so you might not get a fast response. \r\n\r\n-->\r\nSince version 8 in Ipython I frequently - very frequently - get IPython crashes (termination) of the kind below. \r\n\r\nI think the specific situation is that I edit code, I use autoreload(3), there is a bug, but when IPython tries traceback it crashes and terminates. Since a main point of using IPython is the auto-reload, this makes it almost unusable for development compared to Version 7.x.x. (Certainly distracting enough to spend the time to finally post it here.)\r\n\r\nI have seen there is a few other bugs of that kind reported, but I was not sure which would be similar enough to any of them, hence I post this separately. My apologies for any duplications.\r\n\r\nI am not sure whether the error is strictly reproducible as it happens in situations when code is edited.\r\n\r\nI use Python 3.10.2 built from source on Linux (Fedora 34).\r\n\r\nI am using pylab mode which loads matplotlib, I am not sure whether their event loop may interfere with IPython.\r\nJust a thought.\r\n\r\n```\r\nIn [15]: m.plot1()\r\nError in sys.excepthook:\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1979, in showtraceback\r\n stb = value._render_traceback_()\r\nAttributeError: 'NotOneValueFound' object has no attribute '_render_traceback_'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1981, in showtraceback\r\n stb = self.InteractiveTB.structured_traceback(etype,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 1105, in structured_traceback\r\n return FormattedTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 999, in structured_traceback\r\n return VerboseTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 871, in structured_traceback\r\n formatted_exceptions += self.format_exception_as_a_whole(etype, evalue, etb, lines_of_context,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 804, in format_exception_as_a_whole\r\n frames.append(self.format_record(r))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 723, in format_record\r\n result += ''.join(_format_traceback_lines(frame_info.lines, Colors, self.has_colors, lvals))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 698, in lines\r\n pieces = self.included_pieces\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 649, in included_pieces\r\n pos = scope_pieces.index(self.executing_piece)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 628, in executing_piece\r\n return only(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/executing/executing.py\", line 164, in only\r\n raise NotOneValueFound('Expected one value, found 0')\r\nexecuting.executing.NotOneValueFound: Expected one value, found 0\r\n\r\nOriginal exception was:\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 3361, in run_code\r\n exec(code_obj, self.user_global_ns, self.user_ns)\r\n File \"\u003cipython-input-15-0de954ff7b19>\", line 1, in \u003ccell line: 1>\r\n File \"/home/alex/python/source/multistar/base.py\", line 586, in plot1\r\n rr = norm(self.y[self.y_rad])\r\nAttributeError: 'Direct' object has no attribute 'y_rad'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1979, in showtraceback\r\n stb = value._render_traceback_()\r\nAttributeError: 'AttributeError' object has no attribute '_render_traceback_'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 3301, in run_ast_nodes\r\n if await self.run_code(code, result, async_=asy):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 3378, in run_code\r\n self.showtraceback(running_compiled_code=True)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1981, in showtraceback\r\n stb = self.InteractiveTB.structured_traceback(etype,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 1105, in structured_traceback\r\n return FormattedTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 999, in structured_traceback\r\n return VerboseTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 852, in structured_traceback\r\n formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 804, in format_exception_as_a_whole\r\n frames.append(self.format_record(r))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 723, in format_record\r\n result += ''.join(_format_traceback_lines(frame_info.lines, Colors, self.has_colors, lvals))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 698, in lines\r\n pieces = self.included_pieces\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 649, in included_pieces\r\n pos = scope_pieces.index(self.executing_piece)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 628, in executing_piece\r\n return only(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/executing/executing.py\", line 164, in only\r\n raise NotOneValueFound('Expected one value, found 0')\r\nexecuting.executing.NotOneValueFound: Expected one value, found 0\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1979, in showtraceback\r\n stb = value._render_traceback_()\r\nAttributeError: 'NotOneValueFound' object has no attribute '_render_traceback_'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 2900, in _run_cell\r\n return runner(coro)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/async_helpers.py\", line 129, in _pseudo_sync_runner\r\n coro.send(None)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 3098, in run_cell_async\r\n has_raised = await self.run_ast_nodes(code_ast.body, cell_name,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 3320, in run_ast_nodes\r\n self.showtraceback()\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1981, in showtraceback\r\n stb = self.InteractiveTB.structured_traceback(etype,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 1105, in structured_traceback\r\n return FormattedTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 999, in structured_traceback\r\n return VerboseTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 871, in structured_traceback\r\n formatted_exceptions += self.format_exception_as_a_whole(etype, evalue, etb, lines_of_context,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 804, in format_exception_as_a_whole\r\n frames.append(self.format_record(r))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 723, in format_record\r\n result += ''.join(_format_traceback_lines(frame_info.lines, Colors, self.has_colors, lvals))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 698, in lines\r\n pieces = self.included_pieces\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 649, in included_pieces\r\n pos = scope_pieces.index(self.executing_piece)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 628, in executing_piece\r\n return only(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/executing/executing.py\", line 164, in only\r\n raise NotOneValueFound('Expected one value, found 0')\r\nexecuting.executing.NotOneValueFound: Expected one value, found 0\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1979, in showtraceback\r\n stb = value._render_traceback_()\r\nAttributeError: 'NotOneValueFound' object has no attribute '_render_traceback_'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/alex/Python/bin/ipython3\", line 8, in \u003cmodule>\r\n sys.exit(start_ipython())\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/__init__.py\", line 123, in start_ipython\r\n return launch_new_instance(argv=argv, **kwargs)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/traitlets/config/application.py\", line 846, in launch_instance\r\n app.start()\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/terminal/ipapp.py\", line 318, in start\r\n self.shell.mainloop()\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/terminal/interactiveshell.py\", line 653, in mainloop\r\n self.interact()\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/terminal/interactiveshell.py\", line 646, in interact\r\n self.run_cell(code, store_history=True)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 2854, in run_cell\r\n result = self._run_cell(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 2905, in _run_cell\r\n self.showtraceback(running_compiled_code=True)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 1981, in showtraceback\r\n stb = self.InteractiveTB.structured_traceback(etype,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 1105, in structured_traceback\r\n return FormattedTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 999, in structured_traceback\r\n return VerboseTB.structured_traceback(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 871, in structured_traceback\r\n formatted_exceptions += self.format_exception_as_a_whole(etype, evalue, etb, lines_of_context,\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 804, in format_exception_as_a_whole\r\n frames.append(self.format_record(r))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/IPython/core/ultratb.py\", line 723, in format_record\r\n result += ''.join(_format_traceback_lines(frame_info.lines, Colors, self.has_colors, lvals))\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 698, in lines\r\n pieces = self.included_pieces\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 649, in included_pieces\r\n pos = scope_pieces.index(self.executing_piece)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/utils.py\", line 145, in cached_property_wrapper\r\n value = obj.__dict__[self.func.__name__] = self.func(obj)\r\n File \"/home/alex/Python/lib/python3.10/site-packages/stack_data/core.py\", line 628, in executing_piece\r\n return only(\r\n File \"/home/alex/Python/lib/python3.10/site-packages/executing/executing.py\", line 164, in only\r\n raise NotOneValueFound('Expected one value, found 0')\r\nexecuting.executing.NotOneValueFound: Expected one value, found 0\r\n```","author":{"url":"https://github.com/2sn","@type":"Person","name":"2sn"},"datePublished":"2022-03-20T06:11:18Z","url":"https://github.com/ipython/ipython/issues/13598"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e6c381bc-6b06-53a9-f2a9-39a192f5c329 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C854:2D2F2F:697A14:8AC229:6B00D2A2 |
| html-safe-nonce | 6a849baee59d75ebf10a90f3c64707a4f76d840443a17453bfdbf216ec92962c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODU0OjJEMkYyRjo2OTdBMTQ6OEFDMjI5OjZCMDBEMkEyIiwidmlzaXRvcl9pZCI6IjY2MDgwNjk5ODcxNTAxMjM2ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5b7e6fa752f74fec679c66da84e6a5e7524f51ed98e79d7f4167eff52ac34f87 |
| hovercard-subject-tag | issue:1174450670 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ipython/ipython/13598/issue_layout |
| twitter:image | https://opengraph.githubassets.com/17a8de8edeecea43e9b68e2ffea883e2f1aa54640934f8aa5d6154270bc28e8e/ipython/ipython/issues/13598 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/17a8de8edeecea43e9b68e2ffea883e2f1aa54640934f8aa5d6154270bc28e8e/ipython/ipython/issues/13598 |
| og:image:alt | Since version 8 in Ipython I frequently - very frequently - get IPython crashes (termination) of the kind below. I think the specific situation is that I edit code, I use autoreload(3), there is a ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 2sn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| turbo-cache-control | no-preview |
| go-import | github.com/ipython/ipython git https://github.com/ipython/ipython.git |
| octolytics-dimension-user_id | 230453 |
| octolytics-dimension-user_login | ipython |
| octolytics-dimension-repository_id | 658518 |
| octolytics-dimension-repository_nwo | ipython/ipython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 658518 |
| octolytics-dimension-repository_network_root_nwo | ipython/ipython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width