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

No module named 'utils.command_line_utils' #590

Closed
V4G4X opened this issue Aug 29, 2024 · 2 comments
Closed

No module named 'utils.command_line_utils' #590

V4G4X opened this issue Aug 29, 2024 · 2 comments
Labels
bug This issue is a bug. closed-for-staleness p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days.

Comments

@V4G4X
Copy link

V4G4X commented Aug 29, 2024

Describe the bug

On running the websocket_connect.py sample, I keep seeing this error that there is

ModuleNotFoundError: No module named 'utils.command_line_utils'

Even though I have not touched the utils folder or the websocket_connect.py file.

python samples/websocket_connect.py --endpoint $AWS_IOT_ENDPOINT --signing_region $AWS_REGION \
--access_key_id $AWS_ACCESS_KEY_ID \
--secret_access_key $AWS_SECRET_ACCESS_KEY \
--session_token $AWS_SESSION_TOKEN

Expected Behavior

I expect that the script should make a connection to the MQTT broker over web sockets.

Current Behavior

I see

❯ python samples/websocket_connect.py --endpoint $AWS_IOT_ENDPOINT --signing_region $AWS_REGION --access_key_id $AWS_ACCESS_KEY_ID --secret_access_key $AWS_SECRET_ACCESS_KEY --session_token $AWS_SESSION_TOKEN

Traceback (most recent call last):
  File "/Users/user_id/POCs/aws-iot-device-sdk-python-v2/samples/websocket_connect.py", line 6, in <module>
    from utils.command_line_utils import CommandLineUtils
ModuleNotFoundError: No module named 'utils.command_line_utils'

Reproduction Steps

Clean commit: 1ef6533

  1. Export all the required env variables: AWS_IOT_ENDPOINT, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
  2. Run: python samples/websocket_connect.py --endpoint $AWS_IOT_ENDPOINT --signing_region $AWS_REGION --access_key_id $AWS_ACCESS_KEY_ID --secret_access_key $AWS_SECRET_ACCESS_KEY --session_token $AWS_SESSION_TOKEN

Possible Solution

No response

Additional Information/Context

On a completely clean working tree (git).

This is my pip freeze:

aiofiles==23.2.1
annotated-types==0.6.0
anyio==4.2.0
arrow==1.3.0
asn1==2.7.0
asttokens==2.4.1
awscrt==0.21.1
awsiot==0.1.3
awsiotsdk==1.22.0
blessed==1.20.0
boltons @ file:///Users/cbousseau/work/recipes/ci_py311/boltons_1677965141748/work
boto3==1.34.22
botocore==1.34.22
bpylist2==4.1.1
brotlipy==0.7.0
cached-property==1.5.2
certifi @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_5c4sjwommo/croot/certifi_1683875376620/work/certifi
cffi @ file:///Users/cbousseau/work/recipes/ci_py311/cffi_1677903595907/work
charset-normalizer==3.3.2
click==8.1.7
coloredlogs==15.0.1
conda @ file:///private/var/folders/k1/30mswbxs7r1g6zwn8y4fyt500000gp/T/abs_0cwmmds6q9/croot/conda_1689269929143/work
conda-content-trust @ file:///Users/cbousseau/work/recipes/ci_py311/conda-content-trust_1677970020347/work
conda-libmamba-solver @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_48qgqxi1ys/croot/conda-libmamba-solver_1685032355439/work/src
conda-package-handling @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_57h_oo3f_8/croot/conda-package-handling_1685024802254/work
conda_package_streaming @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_4fwljxujl7/croot/conda-package-streaming_1685019683894/work
construct==2.10.70
cryptography==41.0.7
daemonize==2.5.0
decorator==5.1.1
developer-disk-image==0.0.2
dnspython==2.4.2
email-validator==2.1.0.post1
enum-compat==0.0.3
executing==2.0.1
fastapi==0.109.0
gpxpy==1.5.0
h11==0.14.0
hexdump==3.3
httpcore==1.0.2
httptools==0.6.1
httpx==0.26.0
humanfriendly==10.0
hyperframe==6.0.1
idna @ file:///Users/cbousseau/work/recipes/ci_py311/idna_1677906072337/work
ifaddr==0.2.0
inquirer3==0.4.0
ipsw-parser==1.2.1
ipython==8.20.0
itsdangerous==2.1.2
jedi==0.19.1
Jinja2==3.1.3
jmespath==1.0.1
jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work
jsonpointer==2.1
la-panic==0.4.9
libmambapy @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_097by3g74m/croot/mamba-split_1685997889336/work/libmambapy
MarkupSafe==2.1.3
matplotlib-inline==0.1.6
nest-asyncio==1.5.9
opack==0.1.0
orjson==3.9.12
packaging @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_e946luvhc3/croot/packaging_1678965323926/work
parameter-decorators==0.0.2
parso==0.8.3
pexpect==4.9.0
pillow==10.2.0
pluggy @ file:///Users/cbousseau/work/recipes/ci_py311/pluggy_1677906980825/work
plumbum==1.8.2
prompt-toolkit==3.0.43
psutil==5.9.7
ptyprocess==0.7.0
pure-eval==0.2.2
pycosat @ file:///Users/cbousseau/work/recipes/ci_py311/pycosat_1677933552468/work
pycparser==2.21
pycrashreport==1.2.2
pycryptodome==3.20.0
pydantic==2.5.3
pydantic-extra-types==2.4.1
pydantic-settings==2.1.0
pydantic_core==2.14.6
Pygments==2.17.2
pygnuutils==0.1.1
pyimg4==0.8
pykdebugparser==1.2.4
pyOpenSSL @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_ddecjfxr7g/croot/pyopenssl_1678965309681/work
PySocks @ file:///Users/cbousseau/work/recipes/ci_py311/pysocks_1677906386870/work
python-dateutil==2.8.2
python-dotenv==1.0.0
python-editor==1.0.4
python-multipart==0.0.6
pytun-pmd3==1.0.0
pyusb==1.2.1
PyYAML==6.0.1
qh3==0.14.0
readchar==4.0.5
remotezip==0.12.2
requests @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_37wt8ycste/croot/requests_1682607533309/work
ruamel.yaml @ file:///Users/cbousseau/work/recipes/ci_py311/ruamel.yaml_1677934845850/work
s3transfer==0.10.0
six @ file:///tmp/build/80754af9/six_1644875935023/work
sniffio==1.3.0
srptools==1.0.1
stack-data==0.6.3
starlette==0.35.1
tabulate==0.9.0
termcolor==2.4.0
toolz @ file:///Users/cbousseau/work/recipes/ci_py311/toolz_1677925870232/work
tqdm @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_ac7zic_tin/croot/tqdm_1679561870178/work
traitlets==5.14.1
types-python-dateutil==2.8.19.20240106
typing_extensions==4.9.0
ujson==5.9.0
urllib3 @ file:///private/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_e9usuw__8i/croot/urllib3_1686166332689/work
utils==1.0.2
uvicorn==0.26.0
uvloop==0.19.0
watchfiles==0.21.0
wcwidth==0.2.13
websockets==12.0
wsproto==1.2.0
xonsh==0.14.4
zeroconf==0.131.0
zstandard @ file:///Users/cbousseau/work/recipes/ci_py311_2/zstandard_1678996192313/work

SDK version used

awscrt==0.21.1, awsiot==0.1.3, awsiotsdk==1.22.0

Environment details (OS name and version, etc.)

OS: MacOS, Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64

@V4G4X V4G4X added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 29, 2024
@jmklix
Copy link
Member

jmklix commented Aug 30, 2024

I'm not sure why you're getting this error:

ModuleNotFoundError: No module named 'utils.command_line_utils'

I tried repro-ing it, and while I didn't get that error, I did run into some other errors with our utils/command_line_utils.py file. I fixed those with this PR. Can you make sure that file is in the correct location and try running this with my updates?

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Aug 30, 2024
Copy link

github-actions bot commented Sep 9, 2024

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added closing-soon This issue will automatically close in 5 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 5 days unless further comments are made. labels Sep 9, 2024
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. closed-for-staleness p3 This is a minor priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days.
Projects
None yet
Development

No branches or pull requests

2 participants