We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I was trying to import a project from mbed online compiler to uvision5. So, I followed this tutorial: http://www.keil.com/appnotes/files/apnt_207_v2.0.pdf But when I executed the command: mbed export -i uvision5 -m disco_l072cz_lrwan1 it returned the error "No module named jsonschema"
You can see the execution here:
[mbed] Working path "C:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds" (program) Traceback (most recent call last): File "C:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds\.temp\tools\project.py", line 19, in <module> from tools.export import ( File "C:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds\.temp\tools\export\__init__.py", line 29, in <module> from ..config import ALLOWED_FEATURES File "C:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds\.temp\tools\config\__init__.py", line 31, in <module> from jsonschema import Draft4Validator, RefResolver ImportError: No module named jsonschema [mbed] ERROR: "C:\Python27\python.exe" returned error. Code: 1 Path: "C:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds" Command: "C:\Python27\python.exe -u C:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds\.temp\tools\project.py -i uvision5 -m disco_l072cz_lrwan1 --source ." Tip: You could retry the last command with "-v" flag for verbose output ---
Anyone have an idea please? Emmanuel
I finally discovered the reason of this error. It is necessary to install a package jsonschema. In a terminal: pip install jsonschema
Then I had another error: File "c:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds\.temp\tools\project.py", line 145, in export notify.info("Using targets from %s" % targets_json) AttributeError: 'NoneType' object has no attribute 'info' [mbed] ERROR: "C:\Python27\python.exe" returned error. Code: 1 Path: "c:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds" Command: "C:\Python27\python.exe -u c:\Users\emman\GoogleDrive\Keil\DISCO-L072CZ-LRWAN1_blink_leds\.temp\tools\project.py -i uvision5 -m disco_l072cz_lrwan1 --source ." Tip: You could retry the last command with "-v" flag for verbose output ---
To resolve it, I only comented line 145 of project.py file. After that, all worked fine.
Emmanuel