-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Description
Evaluating 5.10 (RC2) and the Pelion device management feature.
The mbed dm
doesn't seem to recognize my MBED_CLOUD_SDK_CONFIG config.
This is my config:
$ mbed config -G --list
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
---
[mbed] Global config:
MBED_CLOUD_SDK_CONFIG=ak_1MDE2NDh.....
[mbed] Local config (/Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal):
No local configuration is set
Then I try to run mbed dm
as follows:
$ mbed dm init -d "arm.com" --model-name "mbed" -v -q
[mbed] WARNING: If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting
---
[mbed] Working path "/Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal" (program)
[mbed] Exec "/usr/local/opt/python/bin/python3.7 -u /Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal/mbed-os/tools/device_management.py init -d arm.com --model-name mbed -q" in "/Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal"
Traceback (most recent call last):
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/configuration.py", line 53, in __init__
self.load(updates=updates)
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/configuration.py", line 105, in load
self.validate()
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/configuration.py", line 110, in validate
raise ValueError("api_key not found in config. Please see documentation.")
ValueError: api_key not found in config. Please see documentation.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal/mbed-os/tools/device_management.py", line 155, in <module>
main()
File "/Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal/mbed-os/tools/device_management.py", line 150, in main
}[options.action](options) or 0
File "/Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal/mbed-os/tools/device_management.py", line 83, in inner
accounts = AccountManagementAPI()
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/core.py", line 48, in __init__
self.config = Config(params)
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/configuration.py", line 61, in __init__
% (',\n\t'.join(self._using_paths), self.path_from_env_key, traceback.format_exc())
Exception: There was a problem loading the SDK configuration file.
Paths attempted, in priority order:
missing: /etc/.mbed_cloud_config.json,
missing: /Users/ms/.mbed_cloud_config.json,
missing: /Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal/.mbed_cloud_config.json
Config file can be set using env key: `MBED_CLOUD_SDK_CONFIG`
The original traceback is recorded below:
Traceback (most recent call last):
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/configuration.py", line 53, in __init__
self.load(updates=updates)
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/configuration.py", line 105, in load
self.validate()
File "/Users/ms/Library/Python/3.7/lib/python/site-packages/mbed_cloud/configuration.py", line 110, in validate
raise ValueError("api_key not found in config. Please see documentation.")
ValueError: api_key not found in config. Please see documentation.
[mbed] ERROR: "/usr/local/opt/python/bin/python3.7" returned error.
Code: 1
Path: "/Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal"
Command: "/usr/local/opt/python/bin/python3.7 -u /Users/ms/mbed/OOB/5.10/mbed-cloud-client-example-sources-internal/mbed-os/tools/device_management.py init -d arm.com --model-name mbed -q"
Tip: You could retry the last command with "-v" flag for verbose output
---
[mbed] WARNING: Using Python 3 with Mbed OS 5.8 and earlier can cause errors with compiling, testing and exporting
Environment
- OSX El Capital
- Mbed CLI 1.8.1
- Python 3.7
- Mbed Cloud SDK 2.0.1
[ ] Question
[ ] Enhancement
[X] Bug