2016-12-06 03:39 PM
Hi,
Referring to this question:
https://community.st.com/0D50X00009Xke8kSAB
Dear customer,
I'll try to give a feedback to you:
•Can scripts be run in a normal Python debug environment rather than using BlueNRG_Script_Launcher to run?
- No the scripts written for BlueNRG device cannot be runned in a normat Python debug because they contain special command understanding only using BlueNRG_Script_Launcher or GUI.•Can I import standard Python modules into my BlueNRG GUI script?Yes, you can import any standard Python modules into BlueNRG GUI script.•Is there a BlueNRG module or package I can import to add Bluetooth capabilities to a normal Python program?
NoRegards,
Graziella MarcheseI tried to import a python package in the script and ran using script launcher but it failed with ImportError. I am using Windows 7 OS. Any suggestion on how to fix this issue?
Thanks in advance.
#bluenrg #bluenrg-gui2016-12-06 11:18 PM
Hi,
Can you share the the complete error message and the lines that cause the error ?
2016-12-07 08:47 AM
Hi,
Error:
C:\Projects
BlueNRG GUI 2.2.1\Application
*>BlueNRG_Script_Launcher.exe -p COM120 -s 'C:\Projects\BlueNRG GUI
2.2.1\Application\scripts\DemoX\SensorDemo_Central.py'*
Exception: Traceback (most recent call last):
File
'c:\GIT_vobs\BlueNRG_GUI_2.2.1\GUI\src\bluenrg_script_launcher\build\BlueNRG_Script*
Launcher\out00-PYZ.pyz\scriptexecuter', line 582, in run
File 'C:\Projects\BlueNRG GUI 2.2.1\App*
lication\scripts\DemoX\SensorDemo_Central.py', line 68, in <module>
import json*
ImportError: No module named json
Thank You,
Dhaval
On Wed, Dec 7, 2016 at 2:18 AM, duflos.benoit <
2016-12-09 12:34 AM
I would be intersting to know what version is embedded into BlueNRG_Script_Launcher tools.
Can you try:
import sys,os
print sys.version
print os.__file__
Before the error - to identify what version Python is executing the script.
Whatever json module have to be supported.