cdk-ec2-key-pair icon indicating copy to clipboard operation
cdk-ec2-key-pair copied to clipboard

import of module is not working

Open thelma1944 opened this issue 3 years ago • 5 comments

import aws_cdk.aws_ec2 as ec2 Exception ignored in: <function _NodeProcess.del at 0x7fcc7bd448b0> Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_kernel/providers/process.py", line 224, in del self.stop() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_kernel/providers/process.py", line 281, in stop if not self._process.stdin.closed: AttributeError: '_NodeProcess' object has no attribute '_process' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/resources.py", line 173, in _path_from_reader yield Path(reader.resource_path(norm_resource)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_runtime.py", line 43, in load _kernel.load(assembly.name, assembly.version, os.fspath(assembly_path)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_kernel/init.py", line 269, in load self.provider.load(LoadRequest(name=name, version=version, tarball=tarball)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_kernel/providers/process.py", line 338, in load return self._process.send(request, LoadResponse) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_utils.py", line 24, in wrapped stored.append(fgetter(self)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_kernel/providers/process.py", line 333, in _process process.start() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_kernel/providers/process.py", line 250, in start self._process = subprocess.Popen( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'node'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/aws_ec2/init.py", line 1443, in from ._jsii import * File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/aws_ec2/_jsii/init.py", line 11, in import aws_cdk.aws_cloudwatch._jsii File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/aws_cloudwatch/init.py", line 495, in from ._jsii import * File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/aws_cloudwatch/_jsii/init.py", line 11, in import aws_cdk.aws_iam._jsii File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/aws_iam/init.py", line 484, in from ._jsii import * File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/aws_iam/_jsii/init.py", line 11, in import aws_cdk.core._jsii File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/core/init.py", line 937, in from ._jsii import * File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/core/_jsii/init.py", line 11, in import aws_cdk.cloud_assembly_schema._jsii File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/cloud_assembly_schema/init.py", line 75, in from ._jsii import * File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aws_cdk/cloud_assembly_schema/_jsii/init.py", line 11, in jsii_assembly = jsii.JSIIAssembly.load( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jsii/_runtime.py", line 43, in load _kernel.load(assembly.name, assembly.version, os.fspath(assembly_path)) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 166, in exit raise RuntimeError("generator didn't stop after throw()") RuntimeError: generator didn't stop after throw()

thelma1944 avatar Dec 01 '21 22:12 thelma1944

Just to make sure: you are familiar with CDK and other CDK modules perfectly work?

The error message says you don't have node installed, so my first thought is, you're using this in a complete different context.

udondan avatar Dec 02 '21 05:12 udondan

Hello Daniel,

  I will set up a 2 node system and see if this fixes the issue.

Thanks for the suggestion.

Respectfully, Thelma Vance, PhD

On Wed, Dec 1, 2021 at 9:47 PM Daniel Schroeder @.***> wrote:

Just to make sure: you are familiar with CDK and other CDK modules perfectly work?

The error message says you don't have node installed, so my first thought is, you're using this in a complete different context.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/udondan/cdk-ec2-key-pair/issues/33#issuecomment-984313459, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHQXBMXRKXWOH235OXEJV3UO4B73ANCNFSM5JFS65SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

thelma1944 avatar Dec 02 '21 15:12 thelma1944

Hi Thelma,

with node I mean NodeJS. This package is written in NodeJS and packaged for Python via jsii. So even if you import the Python package, you will still require node installed on the system. But this is the same for all CDK packages. So I assume you're not using CDK? Then this package will be of no use for you.

Cheers, Daniel

udondan avatar Dec 02 '21 17:12 udondan

Hello Daniel

I will be using CDK soon.  I am just preparing for the development

launch.

Respectfully, Thelma

On Thu, Dec 2, 2021 at 9:40 AM Daniel Schroeder @.***> wrote:

Hi Thelma,

with node I mean NodeJS. This package is written in NodeJS and packaged for Python via jsii https://github.com/aws/jsii. So even if you import the Python package, you will still require node installed on the system. But this is the same for all CDK packages. So I assume you're not using CDK? Then this package will be of no use for you.

Cheers, Daniel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/udondan/cdk-ec2-key-pair/issues/33#issuecomment-984850246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHQXBPIVHM6IBPDAKN2463UO6VPRANCNFSM5JFS65SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

thelma1944 avatar Dec 02 '21 18:12 thelma1944

Hello Daniel,

I installed NodeJS on my MacBook Pro using an install program called brew. Now your module works. Thanks for the help. You might consider adding a line or two to indicate how to load your module to Mac systems, just a thought.

Most respectfully and thankfully, thelma

On Thu, Dec 2, 2021 at 10:14 AM Thelma Vance @.***> wrote:

Hello Daniel

I will be using CDK soon.  I am just preparing for the development

launch.

Respectfully, Thelma

On Thu, Dec 2, 2021 at 9:40 AM Daniel Schroeder @.***> wrote:

Hi Thelma,

with node I mean NodeJS. This package is written in NodeJS and packaged for Python via jsii https://github.com/aws/jsii. So even if you import the Python package, you will still require node installed on the system. But this is the same for all CDK packages. So I assume you're not using CDK? Then this package will be of no use for you.

Cheers, Daniel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/udondan/cdk-ec2-key-pair/issues/33#issuecomment-984850246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHQXBPIVHM6IBPDAKN2463UO6VPRANCNFSM5JFS65SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

thelma1944 avatar Dec 02 '21 18:12 thelma1944