thingsboard-python-rest-client icon indicating copy to clipboard operation
thingsboard-python-rest-client copied to clipboard

tb-rest-client 3.8.0 does not work on Windows venv ImportError: No module named six.moves (with six version 1.10)

Open rretanubun opened this issue 10 months ago • 5 comments

OS: windows OS (win-11 23H2) Python version: 3.12.3

When I try to use the tb-rest client 3.8.0 (pip installed) on from a python script like this:

try:
    from tb_rest_client.rest_client_ce import RestClientCE
    from tb_rest_client.models.models_ce import EntityId
    from tb_rest_client.rest import ApiException
except ImportError as exc:
    print(f"ERROR: Missing dependency. {exc}\n")
    sys.exit(1)

I got this error:

ERROR: Missing dependency. No module named 'six.moves'

A workaround is to do

pip uninstall six // this uninstalls version 1.10
pip install six==1.17.0 // this gives a warning (because tb-rest-client expects 1.10)

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. 
This behaviour is the source of the following dependency conflicts.
tb-rest-client 3.8.0 requires six==1.10, but you have six 1.17.0 which is incompatible.
Successfully installed six-1.17.0

But then the script works. six 1.10 Works okay on Ubuntu Linux 22.04-LTS.

rretanubun avatar Dec 24 '24 14:12 rretanubun