Skip to content

creating root construct in Python #1063

@rittneje

Description

@rittneje

I installed constructs version 10.1.14 via pip. I am using Python 3.9.12 and NodeJS 16.15.0. I tried to create a root construct, but it throws an exception.

import constructs

constructs.Construct(None, '')

jsii.errors.JavaScriptError:
Error: Got 'undefined' for non-optional instance of {"docs":{"summary":"The scope in which to define this construct."},"name":"scope","type":{"fqn":"constructs.Construct"}}
at nullAndOk (/tmp/tmpnx__46nv/lib/program.js:9608:23)
at Object.deserialize (/tmp/tmpnx__46nv/lib/program.js:9382:25)
at Kernel._toSandbox (/tmp/tmpnx__46nv/lib/program.js:8771:69)
at /tmp/tmpnx__46nv/lib/program.js:8819:42
at Array.map ()
at Kernel._boxUnboxParameters (/tmp/tmpnx__46nv/lib/program.js:8819:27)
at Kernel._toSandboxValues (/tmp/tmpnx__46nv/lib/program.js:8805:29)
at /tmp/tmpnx__46nv/lib/program.js:8420:75
at Kernel._wrapSandboxCode (/tmp/tmpnx__46nv/lib/program.js:8848:24)
at Kernel._create (/tmp/tmpnx__46nv/lib/program.js:8420:34)

Is this a bug? Or is there some other way I'm supposed to create a root construct in Python?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions