PlasmaPy
PlasmaPy copied to clipboard
plasma-calculator errors in pc._create_output_layout()
Bug description
I ran plasma-calculator and the automatically opened file cannot be found but when I enter http://localhost:8866/ the page shows, however I cannot get it to calculate any outputs. The full output in the terminal is as follows:
admins@admins:~$ plasma-calculator
/home/admins/.local/lib/python3.10/site-packages/traitlets/traitlets.py:1241: DeprecationWarning: Deprecated, use VoilaConfiguration.file_allowlist instead.
return self.func(*args, **kwargs)
[Voila] Using /tmp to store connection files
[Voila] Storing connection files in /tmp/voila_waylyalj.
[Voila] Serving static files from /home/admins/.local/lib/python3.10/site-packages/voila/static.
[Voila] Voilà is running at:
http://localhost:8866/
[Voila] Writing notebook-signing key to /home/admins/.local/share/jupyter/notebook_secret
[Voila] WARNING | Notebook plasma_calculator.ipynb is not trusted
[Voila] Kernel started: 2fcb480a-8665-48e2-83a8-09e41cc8fe4e
[Voila] ERROR | Error at server while executing cell: {'cell_type': 'code', 'execution_count': 4, 'metadata': {'trusted': False, 'execution': {'iopub.status.busy': '2024-07-01T08:22:12.464768Z', 'iopub.execute_input': '2024-07-01T08:22:12.465828Z', 'shell.execute_reply': '2024-07-01T08:22:12.963682Z', 'iopub.status.idle': '2024-07-01T08:22:12.967677Z'}}, 'outputs': [{'output_type': 'error', 'ename': 'IndexError', 'evalue': 'list assignment index out of range', 'traceback': ['\x1b[0;31m---------------------------------------------------------------------------\x1b[0m', '\x1b[0;31mIndexError\x1b[0m Traceback (most recent call last)', 'Cell \x1b[0;32mIn[4], line 1\x1b[0m\n\x1b[0;32m----> 1\x1b[0m \x1b[43mpc\x1b[49m\x1b[38;5;241;43m.\x1b[39;49m\x1b[43m_create_output_layout\x1b[49m\x1b[43m(\x1b[49m\x1b[43m)\x1b[49m\n', 'File \x1b[0;32m~/.local/lib/python3.10/site-packages/plasmapy/utils/calculator/main_interface.py:177\x1b[0m, in \x1b[0;36m_create_output_layout\x1b[0;34m()\x1b[0m\n\x1b[1;32m 175\x1b[0m _process_queue\x1b[38;5;241m.\x1b[39mappend(fn)\n\x1b[1;32m 176\x1b[0m children\x1b[38;5;241m.\x1b[39mappend(grid_layout)\n\x1b[0;32m--> 177\x1b[0m \x1b[43mapp\x1b[49m\x1b[38;5;241;43m.\x1b[39;49m\x1b[43mset_title\x1b[49m\x1b[43m(\x1b[49m\x1b[43mi\x1b[49m\x1b[43m,\x1b[49m\x1b[43m \x1b[49m\x1b[43mtitle\x1b[49m\x1b[43m)\x1b[49m\n\x1b[1;32m 178\x1b[0m app\x1b[38;5;241m.\x1b[39mchildren \x1b[38;5;241m=\x1b[39m children\n\x1b[1;32m 180\x1b[0m \x1b[38;5;28;01mreturn\x1b[39;00m app\n', "File \x1b[0;32m~/.local/lib/python3.10/site-packages/ipywidgets/widgets/widget_selectioncontainer.py:69\x1b[0m, in \x1b[0;36m_SelectionContainer.set_title\x1b[0;34m(self, index, title)\x1b[0m\n\x1b[1;32m 67\x1b[0m \x1b[38;5;28;01mif\x1b[39;00m title \x1b[38;5;129;01mis\x1b[39;00m \x1b[38;5;28;01mNone\x1b[39;00m:\n\x1b[1;32m 68\x1b[0m title \x1b[38;5;241m=\x1b[39m \x1b[38;5;124m'\x1b[39m\x1b[38;5;124m'\x1b[39m\n\x1b[0;32m---> 69\x1b[0m \x1b[43mtitles\x1b[49m\x1b[43m[\x1b[49m\x1b[43mindex\x1b[49m\x1b[43m]\x1b[49m\x1b[38;5;241m=\x1b[39mtitle\n\x1b[1;32m 70\x1b[0m \x1b[38;5;28mself\x1b[39m\x1b[38;5;241m.\x1b[39mtitles \x1b[38;5;241m=\x1b[39m \x1b[38;5;28mtuple\x1b[39m(titles)\n", '\x1b[0;31mIndexError\x1b[0m: list assignment index out of range']}], 'source': 'pc._create_output_layout()'}
Traceback (most recent call last):
File "/home/admins/.local/lib/python3.10/site-packages/voila/notebook_renderer.py", line 261, in _jinja_cell_generator
output_cell = await self.executor.execute_cell(
File "/home/admins/.local/lib/python3.10/site-packages/voila/execute.py", line 80, in execute_cell
result = await self.async_execute_cell(cell, cell_index, store_history)
File "/home/admins/.local/lib/python3.10/site-packages/nbclient/client.py", line 1062, in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
File "/home/admins/.local/lib/python3.10/site-packages/nbclient/client.py", line 918, in _check_raise_for_error
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
pc._create_output_layout()
------------------
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[4], line 1
----> 1 pc._create_output_layout()
File ~/.local/lib/python3.10/site-packages/plasmapy/utils/calculator/main_interface.py:177, in _create_output_layout()
175 _process_queue.append(fn)
176 children.append(grid_layout)
--> 177 app.set_title(i, title)
178 app.children = children
180 return app
File ~/.local/lib/python3.10/site-packages/ipywidgets/widgets/widget_selectioncontainer.py:69, in _SelectionContainer.set_title(self, index, title)
67 if title is None:
68 title = ''
---> 69 titles[index]=title
70 self.titles = tuple(titles)
IndexError: list assignment index out of range
[Voila] Connecting to kernel 2fcb480a-8665-48e2-83a8-09e41cc8fe4e.
Googling the error showed nothing relevant so I hope this isn't a duplicate.
Expected outcome
No response
Minimal complete verifiable example
No response
Package versions
'2024.5.0'
Additional context
Running on Ubuntu 22.04.3 LTS.