Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.terminate() got an unexpected keyword argument 'timeout' #2398

Closed
1 task done
camilobermudez85 opened this issue Jan 4, 2021 · 7 comments
Closed
1 task done
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort language/python Related to Python bindings p1

Comments

@camilobermudez85
Copy link

🐛 Bug Report

Affected Languages

  • Python

General Information

  • JSII Version: 1.16.0
  • Platform: Debian

What is the problem?

Hey, guys. While running cdk diff on a python 3.7.6 app I'm getting the next error:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/jsii/_kernel/providers/process.py", line 293, in stop
    self._process.wait(timeout=5)
  File "/usr/local/lib/python3.7/subprocess.py", line 1019, in wait
    return self._wait(timeout=timeout)
  File "/usr/local/lib/python3.7/subprocess.py", line 1645, in _wait
    raise TimeoutExpired(self.args, timeout)
subprocess.TimeoutExpired: Command '['node', '/usr/local/lib/python3.7/site-packages/jsii/_embedded/jsii/jsii-runtime.js']' timed out after 5 seconds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/jsii/_kernel/providers/process.py", line 296, in stop
    self._process.terminate(timeout=5)
TypeError: terminate() got an unexpected keyword argument 'timeout'

The problem seems to be caused by this change introduced in PR #2100:

image

Indeed, timeout is not a valid parameter for that method, perhaps removing it should be enough to fix the issue. Thanks a lot!

@RomainMuller

@camilobermudez85 camilobermudez85 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 4, 2021
@jhzab
Copy link

jhzab commented Jan 6, 2021

I'm also running into the timeout when using cdk synth.

Running under Ubuntu 20.04 on WSL1.
aws-cdk version (python modules and nodejs cli tool): 1.82.0
nodejs version: 14.15.4 (but also tried with 10.x and 12.x)
python version: 3.8.5

Steps to reproduce:

  • mkdir sftest
  • cd sftest
  • cdk init sample-app --language=python
  • Add aws-cdk.aws_stepfunctions_tasks==1.82.0 to install_requires and install dependencies (do not install the sftest package :-) )
  • Add from aws_cdk import aws_stepfunctions_tasks as sfn_tasks to the stack under sftest/sftest_stack.py
  • Run cdk synth
  • Error will be at the top of the output

Error appears only with the import. Hope the information is helpful.

@RomainMuller
Copy link
Contributor

Oh jeez. Yeah I'll get a fix out ASAP.

RomainMuller added a commit that referenced this issue Jan 13, 2021
…timeout'

Corrected usage of `process.terminate` to remove unexpected `timeout`
argument. Not sure how this did not surface in integration tests (will
investigate later).

Fixes #2398
RomainMuller added a commit that referenced this issue Jan 13, 2021
…timeout'

Corrected usage of `process.terminate` to remove unexpected `timeout`
argument. Not sure how this did not surface in integration tests (will
investigate later).

Fixes #2398
RomainMuller added a commit that referenced this issue Jan 13, 2021
…timeout'

Corrected usage of `process.terminate` to remove unexpected `timeout`
argument. Not sure how this did not surface in integration tests (will
investigate later).

Fixes #2398
@RomainMuller RomainMuller added language/python Related to Python bindings p1 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 13, 2021
RomainMuller added a commit that referenced this issue Jan 13, 2021
…timeout' (#2421)

Corrected usage of `process.terminate` to remove unexpected `timeout`
argument. Not sure how this did not surface in integration tests (will
investigate later).

Fixes #2398
@RomainMuller
Copy link
Contributor

This ought to be solved by release 1.17.1 of the jsii runtime library, which should be available already (pip install --upgrade jsii should do the magic)

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@RomainMuller
Copy link
Contributor

@all-contributors add @camilobermudez85 for bug

@allcontributors
Copy link
Contributor

@RomainMuller

I've put up a pull request to add @camilobermudez85! 🎉

@camilobermudez85
Copy link
Author

camilobermudez85 commented Jan 14, 2021

This ought to be solved by release 1.17.1 of the jsii runtime library, which should be available already (pip install --upgrade jsii should do the magic)

@RomainMuller Thanks a lot! Keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort language/python Related to Python bindings p1
Projects
None yet
Development

No branches or pull requests

3 participants