Skip to content

Export to draw.io is unsuccessful #329

Closed
@citylineclark

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:

  1. Go to [Workload Discovery on AWS] > Diagrams > diagram > Export
  2. select Diagrams.net (formerly Draw.io)
  3. Export button is disabled
  4. 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.5
c.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.width
0.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

No one assigned

    Labels

    bugSomething isn't workingtriagedHas been triaged by solutions team

    Type

    No type

    Projects

    • Status

      ✅ Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions