AttributeError: 'NoneType' object has no attribute 'groupdict'
See original GitHub issueIssue Description
Terraform 0.13.2 OS Ubuntu 20.04 Install via pip
[2020-09-14 18:24:52,501] ERROR in app: Exception on /graph.svg [GET]
Traceback (most recent call last):
File "/home/pepodev/.local/lib/python3.8/site-packages/blastradius/handlers/dot.py", line 455, in _module
return m.groupdict()['module']
AttributeError: 'NoneType' object has no attribute 'groupdict'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pepodev/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/pepodev/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pepodev/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pepodev/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/pepodev/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pepodev/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/pepodev/.local/lib/python3.8/site-packages/blastradius/server/server.py", line 36, in graph_svg
dot = DotGraph('', file_contents=run_tf_graph())
File "/home/pepodev/.local/lib/python3.8/site-packages/blastradius/handlers/dot.py", line 56, in __init__
self.nodes.append(DotNode(e.target))
File "/home/pepodev/.local/lib/python3.8/site-packages/blastradius/handlers/dot.py", line 415, in __init__
self.module = DotNode._module(self.label) # for module groupings. 'root' or 'module.foo.module.bar'
File "/home/pepodev/.local/lib/python3.8/site-packages/blastradius/handlers/dot.py", line 457, in _module
raise Exception("None: ", label)
Exception: ('None: ', '[root] module.allow_nfs (close)')
Issue Analytics
- State:
- Created 3 years ago
- Reactions:24
- Comments:12
Top Results From Across the Web
AttributeError: 'NoneType' object has no attribute 'groupdict'
'NoneType' object has no attribute 'groupdict' means you are calling the method groupdict() on an object containing None.
Read more >AttributeError: 'NoneType' object has no attribute 'group'
The Python "AttributeError: 'NoneType' object has no attribute" occurs when we try to call the group() method on a None value, e.g. after...
Read more >AttributeError: 'NoneType' object has no attribute ... - Treehouse
AttributeError : 'NoneType' object has no attribute 'groupdict' With mine and Kenneth's code. Here is my code:.
Read more >AttributeError: 'NoneType' object has no ... - Google Groups
Hi,. I am trying to read existing excel file to update some values. But OpenPyExcel giving "AttributeError: 'NoneType' object has no attribute ' ......
Read more >[Solved] AttributeError: Nonetype Object Has No Attribute Group
In this article we will discuss AttributeError:Nonetype object has no Attribute Group. We will understand it and then find solution for it.
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
I got it to render a graph by changing the regex as well, in
blastradius/handlers/dot.py
to bem = re.match(r'(\[root\]\s+)*(?P<module>\S+)\.(?P<type>\S+)[. ]\S+', label)
Not the
[. ]
after the capture for the<type>
group. The offending label that was crashing for me was[root] module.kv (close)
This character class handles a
.
or a\s
after a module typeI’ll submit a PR maybe by the weekend
Closed. I found alternative to visual infrastructure from Terraform.