No module named 'utils.command_line_utils'
altjx opened this issue · 4 comments
Describe the bug
When running pubsub.py, an error is presented that states the following:
Traceback (most recent call last):
File "/root/sdk-workspace/aws-iot-device-sdk-python-v2/samples/pubsub.py", line 10, in <module>
from utils.command_line_utils import CommandLineUtils
ModuleNotFoundError: No module named 'utils.command_line_utils'
Similar/same issue as #382 and #352 I believe
Expected Behavior
It should have worked
Current Behavior
Here's a copy/paste from the README:
root@ip-172-31-80-246:~# python3 -m pip install awsiotsdk
Requirement already satisfied: awsiotsdk in /usr/local/lib/python3.10/dist-packages (1.0.0.dev0)
Requirement already satisfied: awscrt==0.16.19 in /usr/local/lib/python3.10/dist-packages (from awsiotsdk) (0.16.19)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@ip-172-31-80-246:~# mkdir sdk-workspace
root@ip-172-31-80-246:~# cd sdk-workspace/
root@ip-172-31-80-246:~/sdk-workspace# git clone https://github.com/aws/aws-iot-device-sdk-python-v2
Cloning into 'aws-iot-device-sdk-python-v2'...
remote: Enumerating objects: 2156, done.
remote: Counting objects: 100% (884/884), done.
remote: Compressing objects: 100% (349/349), done.
remote: Total 2156 (delta 668), reused 667 (delta 523), pack-reused 1272
Receiving objects: 100% (2156/2156), 2.08 MiB | 11.95 MiB/s, done.
Resolving deltas: 100% (1345/1345), done.
root@ip-172-31-80-246:~/sdk-workspace# python3 -m pip install ./aws-iot-device-sdk-python-v2
Processing ./aws-iot-device-sdk-python-v2
Preparing metadata (setup.py) ... done
Requirement already satisfied: awscrt==0.16.19 in /usr/local/lib/python3.10/dist-packages (from awsiotsdk==1.0.0.dev0) (0.16.19)
Building wheels for collected packages: awsiotsdk
Building wheel for awsiotsdk (setup.py) ... done
Created wheel for awsiotsdk: filename=awsiotsdk-1.0.0.dev0-py3-none-any.whl size=72346 sha256=a1be200574f397556567e54fe2b7bd936ebe08c9e91daf14c388a9d439239a1b
Stored in directory: /root/.cache/pip/wheels/1f/24/84/6608b777270d946fb9ebd980ec7839f8b7168cf10acb5b0f3e
Successfully built awsiotsdk
Installing collected packages: awsiotsdk
Attempting uninstall: awsiotsdk
Found existing installation: awsiotsdk 1.0.0.dev0
Uninstalling awsiotsdk-1.0.0.dev0:
Successfully uninstalled awsiotsdk-1.0.0.dev0
Successfully installed awsiotsdk-1.0.0.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@ip-172-31-80-246:~/sdk-workspace# python3 aws-iot-device-sdk-python-v2/samples/pubsub.py
Traceback (most recent call last):
File "/root/sdk-workspace/aws-iot-device-sdk-python-v2/samples/pubsub.py", line 10, in <module>
from utils.command_line_utils import CommandLineUtils
ModuleNotFoundError: No module named 'utils.command_line_utils'
root@ip-172-31-80-246:~/sdk-workspace#
Reproduction Steps
Follow the README to clone the repository and run the pubsub.py file
Possible Solution
No response
Additional Information/Context
No response
SDK version used
v1.15.2
Environment details (OS name and version, etc.)
Ubuntu 22.04.2 LTS
Hello @altjx ,
Thank you very much for your submission. I have attempted to reproduce the behavior you experienced but was unable too. Building the pubsub.py sample following the current README.md to clone the repository and run the pubsub.py sample results in successful behavior on my end.
Could you please check if /root/sdk-workspace/aws-iot-device-sdk-python-v2/samples/utils/command_line_utils.py
is present?
You will not be able to build the pubsub sample without this file.
Thank you very much for your time and collaboration.
Sincerely,
Yasmine
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.