Description
Describe the bug
When export to draw.io, an error comes up
n unsupported operand type(s) for *: 'NoneType' and 'float'
To Reproduce
Steps to reproduce the behavior:
- Go to [Workload Discovery on AWS] > Diagrams > diagram > Export
- select Diagrams.net (formerly Draw.io)
- Export button is disabled
- After a while, error comes up
unsupported operand type(s) for *: 'NoneType' and 'float'
Expected behavior
Export to draw.io should be successful. CSV export is successful.
Browser (please complete the following information):
Tried on Chrome and Edge
Additional context
Checking the logs in cloudwatch [/aws/lambda/aws-perspective-DrawIoExportResolve-DrawIoFunction] this can be seen
[ERROR] TypeError: unsupported operand type(s) for : 'NoneType' and 'float'
Traceback (most recent call last):
File "/var/task/main.py", line 176, in handler
xml_output = produce_xml_output(elements)
File "/var/task/main.py", line 207, in produce_xml_output
xml_object = elem.get_xml_object()
File "/var/task/main.py", line 98, in get_xml_object
'x': str(self.x),
File "/var/task/main.py", line 67, in x
children_points = list(
File "/var/task/main.py", line 68, in
filter(None, map(lambda c: (c.center_x - 0.5c.width), self.children)))
File "/var/task/main.py", line 54, in width
children_points = list(
File "/var/task/main.py", line 55, in
filter(None, map(lambda c: (c.width0.5 + c.center_x), self.children)))
File "/var/task/main.py", line 54, in width
children_points = list(
File "/var/task/main.py", line 55, in
filter(None, map(lambda c: (c.width0.5 + c.center_x), self.children)))
Error on JSON Export
Also see an error with JSON export, browser showing javascript error
CreateJSONExport.js:2 Uncaught TypeError: e.nodes is not a function
at CreateJSONExport.js:2:24
at onClick (ExportDiagram.js:50:18)
Metadata
Assignees
Type
Projects
Status
✅ Done