python 2.7 or later is asking for me to encode
when i'm trying to get the chip information by using cc_info.py through cygwin or command prompt terminal. it is telling that unicode strings are not supported, please encode to bytes: '▒\x00\x00\x00 It is telling encode to bytes. Not able to identify what is the error happened only i'm new to the python language help me in some way.
Hello @vprithiviraj , can you tell me on which file is this error? Unfortunately I don't have any windows machine around and I cannot debug this.
here with i attached which are all the lines the terminal is showing like that. i tried to run in cygwin terminal. there i didn't get the detailed information about those things. so i did wite the MS command prompt and gave you as a screenshot.
thanks in advance

Ok, it looks that there is a system exception somewhere and the error message is not on english. I guess you are using a non-english windows system?
For a quick solution, I would say to open cc_info.py, go to line 30 and change what's in the print parenthesis with:
("uERROR: %s" % unicode(e))
let me know if this helps
python 2.7.11 is recommended only know?
I have to install that package first dude..
Yes, I could spend some time to make this code compatible with python 3.x there is not much work needed. Thanks for reporting this 👍
thanks for your patience. Actually it took some time for installation of python 2.7.11. now the different error came comparing before. i hope u can understand by below screenshot

It looks you are missing the serial python module. Make sure to run the following in the project folder in order to install everything:
pip install -r requirements.txt
Ps. Check this section on the readme: https://github.com/wavesoft/CCLib#2-prepare-your-software
i have installed the pyserial using the above mentioned command before only. but still that error is coming.
i downloaded separate pyserial as exe format and installed after that also same error.
It sounds like PYTHONPATH is not defined in your environment, so python doesn't know where to look for modules. Have a look here: https://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-7
NO.. it is not happening now also dude. same error of last screenshot i shared you
it is telling only about the module named as serial is not available. so will i be able to clear the output by adding the python script in the folder where i copied all these cc debugging python scripts.
is there any particular location i should keep all the cc debugging python scripts for make the serial to get detected??

i tried with cygwin terminal also after doing all this for observing error it is giving like that. so there i found different like in the screenshot i attached above
can you respond for this when you are free?
Hey @vprithiviraj , it seems that something is going wrong with your python installation. From a quick google search I found this, which I am not sure it's helpful : http://stackoverflow.com/questions/18946286/python3-installed-successfully-but-cannot-be-opened-in-terminal
So, one thing to check is that your PYTHONPATH variable points to the same version of the directory that your python version. Ex. dont use the Python 3.x modules when running Python 2.x.
One last thing that you could try is to use virtualenv to create an isolated environment with only what you want, properly installed:
- Go to the project folder and type
virtualenv env - This will create a folder
envthat contains a sandboxed version of the python modules - Activate that environment, typing
env\Scripts\activate - Install again the correct modules typing
pip install -r requirements.txt - Try to run the scripts again (try also running them like
python ci_info.py COM12) - When you are done, close the window or type
deactivateto deactivate the sandbox
today i cleared all my python errors araised. but not it is telling could not read from the serial port. So what can be possibilities for this??
A few things:
- First the obvious, make sure it's correctly connected and you see the COM port in the windows devices.
- Make sure you are using the correct port (use the arduino IDE -> Open the Serial Monitor and see if it succeeds).
- Make sure you have flashed the correct thing to your arduino.
Also, can you paste a screenshot with the error. I want to see if this is an exception or an error with your set-up.
Hi, i was not able to get back to my work bcoz of festival holidays. now i have shared the screenshot of the error. kindly look into that.

when i didn't connect the arduno Uno, the com port the error will look like the second response
And also i'm doubtful that i'm using HM-10 breakout module for this work. if any inbulit HM-10 firmware is dumped in the breakout board. then whether it will make any restrictions to read the information from the Chip???
Hi Mr.wavesoft, Can you look into my problem? is there any possibility problem with the arduino sketch i dumped in Arduino Uno. Please let me know if you found any solution for this.
Thanks in advance.
Hello @vprithiviraj . From both of these errors it looks that there is something wrong with the communication between your PC and your Arduino. Unfortunately I haven't tested this code on windows and I am not 100% sure that this is not purely a library issue.
What I see is the following:
- The
cc_info.pyopens the COM11 port successfully - The program sends a PING message. From the looks of it, the transmission succeeded
- Then it tries to read a response, but it reads nothing (perhaps the other end closed the port?). That's why you see the
Could not read from the serial port!error. - Then either the library doesn't close the port properly, or the Arduino board has some failure and when it tries to open the port again, it fails with
Could not open port COM11error.
Just to confirm, you have flashed the CCLib_proxy example to your Arduino right?
Something else you can try is to close the Arduino IDE before trying to run the cc_info.py, just in case it keeps some COM port open.
Hey @vprithiviraj , did you have any success eventually? I will get access to a windows computer soon, so I can properly debug this on windows tool. Otherwise, I will close this issue.
did you have any success eventually?
no I have not got any success. COM port error only use to come for me always
i bought the module from https://www.fasttech.com/products/0/10004051/3875400-cc2541-bluetooth-4-0-ble-transparent-serial-data this module is having inbuilt HM-10 firmware. Will that firmware disturb our operation. actually before i thought our process will erase and write our new program inside. but, now i'm suspecting that one may create the issue of COM port error. @wavesoft