Unhandled `TypeError: 'NoneType' object is not subscriptable` in digest.py
See original GitHub issueRan dinghy
from afd56128fbd57da682562540eae739aad230c0e8 with no arguments. Configuration below:
---
digests:
- digest: all_open.html
title: All open items
since: 1000 weeks
items:
- search: org:trussworks is:open is:pr
title: Open pull requests
- search: org:trussworks is:open is:issue
title: Open issues
Got a stack trace:
Traceback (most recent call last):
File "/private/tmp/dinghy/dinghy/.venv/bin/dinghy", line 33, in <module>
sys.exit(load_entry_point('dinghy==0.13.4', 'console_scripts', 'dinghy')())
File "/private/tmp/dinghy/dinghy/.venv/bin/dinghy", line 25, in importlib_load_entry_point
return next(matches).load()
File "/Users/ryan/.local/share/asdf/installs/python/3.10.6/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/Users/ryan/.local/share/asdf/installs/python/3.10.6/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/__main__.py", line 7, in <module>
cli(prog_name="dinghy")
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/cli.py", line 59, in cli
main_run(coro)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/cli.py", line 27, in main_run
return asyncio.run(coro)
File "/Users/ryan/.local/share/asdf/installs/python/3.10.6/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/Users/ryan/.local/share/asdf/installs/python/3.10.6/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 505, in make_digests_from_config
await asyncio.gather(*coros)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 466, in make_digest
results = await asyncio.gather(*coros)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 99, in get_search_results
entries = await self._process_entries(entries)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 266, in _process_entries
entries = await asyncio.gather(*map(self._process_entry, entries))
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 276, in _process_entry
await self._process_pull_request(entry)
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 372, in _process_pull_request
kids, _ = self._trim_unwanted_tree(children.values())
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 384, in _trim_unwanted_tree
if self._node_is_interesting(node):
File "/private/tmp/dinghy/dinghy/.venv/lib/python3.10/site-packages/dinghy/digest.py", line 224, in _node_is_interesting
and node["author"]["__typename"] == "User"
TypeError: 'NoneType' object is not subscriptable
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
TypeError: 'NoneType' object is not subscriptable
NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return...
Read more >Python Math - TypeError: 'NoneType' object is not subscriptable
The reason that lista gets set to None is because the return value of list.sort() is None ... it does not return a...
Read more >[Solved] TypeError: 'NoneType' Object is Not Subscriptable
The TypeError occurs when you try to operate on a value that does not support that operation. The most common reason for an...
Read more >Python TypeError: 'NoneType' object is not subscriptable
The “TypeError: 'NoneType' object is not subscriptable” error is raised when you try to access items from a None value using indexing. This...
Read more >TypeError: 'NoneType' object is not subscriptable in Python
The Python "TypeError: 'NoneType' object is not subscriptable" occurs when we try to access a None value at a specific index. To solve...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is now released as part of dinghy 0.14.0.
Fixed in 730227e.