diff --git a/telegraph/utils.py b/telegraph/utils.py
index c4b9f8b..41b6df9 100644
--- a/telegraph/utils.py
+++ b/telegraph/utils.py
@@ -83,6 +83,11 @@ class HtmlToNodesParser(HTMLParser):
         if tag in VOID_ELEMENTS:
             return
 
+        if not len(self.parent_nodes):
+            raise InvalidHTML('"{}" missing start tag'.format(
+                tag
+            ))
+
         self.current_nodes = self.parent_nodes.pop()
 
         last_node = self.current_nodes[-1]

IndexErrortelegraph.utils in handle_endtag error pop from empty list
os:linux
version: "==1.3.2"
https://sentry.io/share/issue/f0d73c02680a4f0ea637437b236e9ec9/
diff --git a/tests/test_html_converter.py b/tests/test_html_converter.py
index 42af23a..86fecb1 100644
--- a/tests/test_html_converter.py
+++ b/tests/test_html_converter.py
@@ -19,7 +19,7 @@ NODES_TEST_LIST = [
         'attrs': {'href': 'https://telegra.ph/'},
         'children': ['Test link</a>']
         }]
-    },
+     },
     {'tag': 'figure', 'children': [
         {'tag': 'img', 'attrs': {'src': '/file/6c2ecfdfd6881d37913fa.png'}},
         {'tag': 'figcaption'}
@@ -45,6 +45,8 @@ HTML_MULTI_LINES_NODES_LIST = [
     ]},
 ]
 
+HTML_NO_STARTTAG = "</a><h1></h1>"
+
 
 class TestHTMLConverter(TestCase):
     def test_html_to_nodes(self):
@@ -130,3 +132,7 @@ class TestHTMLConverter(TestCase):
         ]
 
         self.assertEqual(clear_whitespace_nodes(nodes)[0], expected)
+
+    def test_no_starttag_node(self):
+        with self.assertRaises(InvalidHTML):
+             html_to_nodes(HTML_NO_STARTTAG)

pip install -e .
parse_log_pytest
requirements.txt
nose pytest
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
nose==1.3.7
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
requests==2.27.1
-e git+https://github.com/python273/telegraph.git@945656298692f6c03aae325f02344caa137f9f7d#egg=telegraph
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: telegraph
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:
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - nose==1.3.7
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - requests==2.27.1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/telegraph

tests/test_html_converter.py::TestHTMLConverter::test_no_starttag_node
tests/test_html_converter.py::TestHTMLConverter::test_clear_whitespace_nodes tests/test_html_converter.py::TestHTMLConverter::test_html_to_nodes tests/test_html_converter.py::TestHTMLConverter::test_html_to_nodes_invalid_html tests/test_html_converter.py::TestHTMLConverter::test_html_to_nodes_multi_line tests/test_html_converter.py::TestHTMLConverter::test_html_to_nodes_not_allowed_tag tests/test_html_converter.py::TestHTMLConverter::test_nodes_to_html tests/test_html_converter.py::TestHTMLConverter::test_nodes_to_html_blank tests/test_html_converter.py::TestHTMLConverter::test_nodes_to_html_nested
telegraph/utils.py
telegraph/utils.py