This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF-LAUNCHXL: [Linux] SLImageCreator fails to start with python exception

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: UNIFLASH

Hi,

I recently upgraded my linux to a fresh distribution; I'm running debian rodete. This comes with python 2.7.13. Since the linux upgrade I'm getting python exceptions when starting the SLImageCreator program that's bundled with uniflash. The exception happens irrespective of what parameters are passed in, and prevents operation of all features of uniflash that makes or signs images; both from commandline (dslite.sh) as well as from the GUI.

The problem appears with uniflash 4.1 and also the latest 4.2.1 that I just downloaded.

Searching for the error message pops up a couple of matches, this one is interesting: https://b.corp.google.com/issues/35900282 

It seems that the socket.py that is baked into the SLImageCreator binary, and comes from the build machine that TI used to package the python installer is incompatible with newer distributions that do not supply a given function in their SSL implementation. In the above bug there is a patch that needs to be applied to the system building the installer: https://b.corp.google.com/action/issues/35900282/attachments/10051780 

This patch adds a try/except block around the import to maintain compatibility forward. Newer python distributions already come with a socket.py that contains the given try/except block.

It seems to me TI needs to do one of the following:

1) apply the patch to socket.py of their python distro and re-package the linux binary.

2) update their python 2.7 to something recent (e.g. 2.7.13) then re-package the linux binary.

It does not seem that I can do anything in order to get uniflash running on my system, since the faulty python file comes from the uniflash package.

Thanks,

Balazs Racz

--- Error message:

uniflash_4.2.1/simplelink/gen2/bin$ ./SLImageCreator
Traceback (most recent call last):
File "<string>", line 31, in <module>
File "/home/user/Downloads/sl_image_creator/venv_ic/lib/python2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 363, in load_module
File "/usr/lib/python2.7/socket.py", line 68, in <module>

ImportError: cannot import name RAND_egd
SLImageCreator returned -1

--- Steps to reproduce

- download debian rodete live CD from https://www.debian.org/CD/live/

- start the live OS. If running in virtual machine, make sure to have at least 4GB of ram.

- in the live linux, download uniflash and install it.

- cd install_dir/uniflash_4.2.1/simplelink/gen2/bin

- ./SLImageCreator