Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%help triggers an unhandled error #28

Closed
hugetim opened this issue Aug 17, 2023 · 0 comments
Closed

%help triggers an unhandled error #28

hugetim opened this issue Aug 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@hugetim
Copy link
Owner

hugetim commented Aug 17, 2023

%help without a command name listed after it causes cell execution to fail, rather than displaying a helpful error message. This traceback shows up in the console:

-[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "C:\Users\tjhuegerich\AppData\Local\Continuum\anaconda3\envs\Python2022-05\lib\site-packages\ipykernel\kernelbase.py", line 406, in dispatch_shell
    await result
  File "C:\Users\tjhuegerich\AppData\Local\Continuum\anaconda3\envs\Python2022-05\lib\site-packages\ipykernel\kernelbase.py", line 721, in execute_request
    reply_content = self.do_execute(
  File "c:\users\tjhuegerich\onedrive - lrca\nbstata\nbstata\kernel.py", line 126, in do_execute
    code_cell = Cell(self, code, silent)
  File "c:\users\tjhuegerich\onedrive - lrca\nbstata\nbstata\cell.py", line 22, in __init__
    self.code = magic_handler.magic(code_w_magics, kernel, self)
  File "c:\users\tjhuegerich\onedrive - lrca\nbstata\nbstata\magics.py", line 178, in magic
    code = self._do_magic(name, code, kernel, cell)
  File "c:\users\tjhuegerich\onedrive - lrca\nbstata\nbstata\magics.py", line 164, in _do_magic
    return getattr(self, "magic_" + name.lstrip('%'))(code, kernel, cell)
  File "c:\users\tjhuegerich\onedrive - lrca\nbstata\nbstata\magics.py", line 425, in magic_help
    'text/html': self._get_help_html(code),
  File "c:\users\tjhuegerich\onedrive - lrca\nbstata\nbstata\magics.py", line 383, in _get_help_html
    soup.find('h2').decompose()
AttributeError: 'NoneType' object has no attribute 'decompose'
@hugetim hugetim added the bug Something isn't working label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant