Undefined symbol: _PyTraceback_Add?

Ok so I managed to mess it up… I bought some IKEA Trådfri yesterday and when starting HASS I got a error in my log about it. Searching for that led me to this topic where I tried to follow the info in Upgrade to 0.55.0 Ikea Tradfri not working anymore step 43…

Now HASS refuses to start and when I try to runt pip3 install cython I get:

(hass_venv) [email protected]:/home/pi$ pip3 install cython
Traceback (most recent call last):
 File "/srv/hass/hass_venv/bin/pip3", line 7, in <module>
   from pip import main
 File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/__init__.py", line 28, in <module>
   from pip.vcs import git, mercurial, subversion, bazaar  # noqa
 File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/vcs/mercurial.py", line 9, in <module>
   from pip.download import path_to_url
 File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/download.py", line 36, in <module>
   from pip.utils.glibc import libc_ver
 File "/srv/hass/hass_venv/lib/python3.4/site-packages/pip/utils/glibc.py", line 4, in <module>
   import ctypes
 File "/usr/lib/python3.4/ctypes/__init__.py", line 7, in <module>
   from _ctypes import Union, Structure, Array
ImportError: /srv/hass/hass_venv/lib/python3.4/lib-dynload/_ctypes.cpython-34m-arm-linux-gnueabihf.so: undefined symbol: _PyTraceback_Add
(hass_venv) [email protected]:/home/pi$

If I try pip uninstall home-assistant I get the same error to… Don’t want to reflash my SD since I’m running node-red, grafana, unifi etc. on it to… Any suggestions what to try?

It looks like something in your virtual environment is corrupted. The beauty of virtual environments is that they are very disposable. Try renaming you existing virtual environment directory and creating it again using the instructions here

starting at step 2. Just make sure you use the same directory as you have now for the new virtual environment.

Ok. sounds easy enough and I’ve become pretty good at following numbered lists since starting with HASS :smiley:
Since my old install is prior to Dec 2016 my virtual environment is named hass_venv

How much would it break if I just followed that guide with the new vevn name homeasssistant instead? I’ve just copied over all my folders from the samba share but how about the mosquitto server etc?

Ok I’ll answer my own question, though that since I could always blame @gpbenton if things got messed up since I got a promise that all my venv was disposable :stuck_out_tongue:

A simple mv /srv/hass/hass_venv/ /srv/hass/hass_venv_old/ seems to have done the trick, after then following the steps as a good boy (yes, I’m married) and when starting HASS I got a message that it was updating my db to the latest version etc!

Still no go on the ikea tradfri but atleast I got my assistant back… btw me and the wife named her SANDI (Smart And Nerdy Device Interface)

1 Like