jsii icon indicating copy to clipboard operation
jsii copied to clipboard

JSII Superchain Python Failure -- ModuleNotFoundError: No module named 'packaging'

Open NapalmCodes opened this issue 3 years ago • 0 comments

Describe the bug

jsii/superchain:1-buster-slim-node16 docker image

This digest is giving the following error:

Using docker image sha256:bbcc9e8f92fe66b766342686a1643b5721aa77b9b998d408e23b8f7fe6b7bdb8 for jsii/superchain:1-buster-slim-node16 with digest jsii/superchain@sha256:8341d66eb6d84de536b5ae0ad3abbab03b83be33473960511b6ee28e825b175e

ModuleNotFoundError: No module named 'packaging'
[jsii-pacmak] [WARN] Failed building python
[jsii-pacmak] [VERBOSE] Cleaning /tmp/npm-packEDz9Tp
[jsii-pacmak] [WARN] python failed
[jsii-pacmak] [VERBOSE] Cleaning up
Error: Command (/tmp/npm-packEDz9Tp/.env-Uan8b2/bin/python -m twine check /builds/<REDACTED>/dist/python/*) failed with status 1:
#STDERR> Traceback (most recent call last):
#STDERR>   File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
#STDERR>     "__main__", mod_spec)
#STDERR>   File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
#STDERR>     exec(code, run_globals)
#STDERR>   File "/tmp/npm-packEDz9Tp/.env-Uan8b2/lib/python3.7/site-packages/twine/__main__.py", line 22, in <module>
#STDERR>     from twine import cli
#STDERR>   File "/tmp/npm-packEDz9Tp/.env-Uan8b2/lib/python3.7/site-packages/twine/cli.py", line 18, in <module>
#STDERR>     from packaging import requirements
#STDERR> ModuleNotFoundError: No module named 'packaging'
#STDERR> 
#STDOUT> 
    at ChildProcess.<anonymous> (/builds/<REDACTED>/node_modules/jsii-pacmak/lib/util.js:178:27)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

This digest did not have the problem

Using docker image sha256:b6a954670864556cc2df02185549cfa32099aead95ab57122234138e9709f2b0 for jsii/superchain:1-buster-slim-node16 with digest jsii/superchain@sha256:706a7cd6b2d98c6790ccfb22d8b2f9c8ead63027368d840bf00301fdd1bd074b ...

Was something removed from the docker image?

Expected Behavior

Python build to be successful and publish the package with Twine.

Current Behavior

Error message described above

Reproduction Steps

Use digests provided

Possible Solution

Restore packaging module to image

Additional Information/Context

No response

SDK version used

1.53.0

Environment details (OS name and version, etc.)

N/A Docker Image

NapalmCodes avatar May 13 '22 15:05 NapalmCodes