mitchellspryn / UrdfSim

Other
104 stars 25 forks source link

TypeError: __init__() got an unexpected keyword argument 'encoding' #21

Closed huckl3b3rry87 closed 4 years ago

huckl3b3rry87 commented 4 years ago

I followed the tutorial on setting up AIRsim for URDFSim and I am able to spawn the URDF AA

Now I am trying to control it, using the documentation here and here, but alas, I am having issues.

I think that it is due to my need to make the PythonClient into a project that is visible by my main project. For instance looking at URDFsim in VS, there are 13 projects

D

But, when I look at my project, again setup using the instructions in the tutorial video, I only have 3 projects and the PythonClient is missing. A

If you look at the folder structure of this, you can see that I copied the PythonClient folder from URDFsim into my project B

Is there way to make it recognize PythonClient here so that it as a startup project?

Thank you!

mitchellspryn commented 4 years ago

For the sake of your sanity, I would recommend having two different VS solutions - one for the python client, one for UrdfSim. Start UrdfSim in one VS instance. Click play in unreal. Then, start your python solution. It should connect.

Be sure to give the window inside Unreal focus. Otherwise, it will run really slowly.

huckl3b3rry87 commented 4 years ago

Sorry for the delay, I had to get Anaconda setup with VS.

Q1: is there an easy way to do this:

Be sure to give the window inside Unreal focus. Otherwise, it will run really slowly.

Unfortunately, I am still running into an issue. Here are my steps:

1) open my main project with an instance of VS 2) right click on the .uproject and open with Unreal A Q2: Is this needed or can I open the project from the File Explorer?

3) open a second instance of VS which is the PythonClient project 4) right click on ArmClientTest.py and select Set as Startup File 5) right click on PythonClient and select Set as Startup Project 6) click play in Unreal 8) click on the PythonClient solution C 7) click the green play button

Then I get an error as F

specifically,


  Message=__init__() got an unexpected keyword argument 'encoding'
  Source=C:\users\admin\documents\workspace\udds_urdf\b\pythonclient\msgpack\_packer.pyx
  StackTrace:
  File "C:\users\admin\documents\workspace\udds_urdf\b\pythonclient\msgpack\_packer.pyx", line 118, in msgpack._cmsgpack.Packer.__init__
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\airsim\client.py", line 24, in ping
    return self.client.call('ping')
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\airsim\client.py", line 54, in confirmConnection
    if self.ping():
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot\ArmClient.py", line 9, in __init__
    self.airsim_client.confirmConnection();
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot\ArmClientTest.py", line 17, in main
    client = ArmClient.ArmClient()
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot\ArmClientTest.py", line 45, in <module>
    main()

So there seems to be a connection issue.

Please let me know if I am doing anything wrong or not needed, thanks!

huckl3b3rry87 commented 4 years ago

also, my AirSim settings, located in ~/Documents/AirSim/ are copied from here, except for the URDF path, which I fixed.

Additionally, I added

"RpcEnabled": true,
"LocalHostIp": "127.0.0.1",

as per this AirSim issue

but still no luck

mitchellspryn commented 4 years ago

Q1: Yes. Click on the viewport. That will give focus to Unreal.

Q2: I think you can just double-click on the .uproj.

That's not a connection error, it looks like something's wrong with your install of msgpack or python. What versions do you have installed? Did you install msgpack-rpc-python? Can you expand the "Python Environments" tab?

huckl3b3rry87 commented 4 years ago

Thank you very much for the fast response!

A could not seem to expand this window, here are the others B

I think that I am using Anaconda 5.2.0

msgpack-python                     0.5.6
msgpack-rpc-python                 0.4.1
multipledispatch                   0.5.0

here are some more details

Backend Qt5Agg is interactive backend. Turning interactive mode on.
Traceback (most recent call last):
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\ptvsd_launcher.py", line 119, in <module>
    vspd.debug(filename, port_num, debug_id, debug_options, run_as)
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\debugger.py", line 37, in debug
    run(address, filename, *args, **kwargs)
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_local.py", line 64, in run_file
    run(argv, addr, **kwargs)
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_local.py", line 125, in _run
    _pydevd.main()
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\pydevd.py", line 1752, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\pydevd.py", line 1099, in run
    return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\pydevd.py", line 1106, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\_pydev_imps\_pydev_execfile.py", line 25, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot\ArmClientTest.py", line 45, in <module>
    main()
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot\ArmClientTest.py", line 17, in main
    client = ArmClient.ArmClient()
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot\ArmClient.py", line 9, in __init__
    self.airsim_client.confirmConnection();
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\airsim\client.py", line 54, in confirmConnection
    if self.ping():
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\airsim\client.py", line 24, in ping
    return self.client.call('ping')
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\session.py", line 41, in call
    return self.send_request(method, args).get()
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\session.py", line 51, in send_request
    self._transport.send_message([message.REQUEST, msgid, method, args])
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 89, in send_message
    self.connect()
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 98, in connect
    socket = ClientSocket(stream, self, self._encodings)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 53, in __init__
    BaseSocket.__init__(self, stream, encodings)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 12, in __init__
    self._packer = msgpack.Packer(encoding=encodings[0], default=lambda x: x.to_msgpack())
  File "msgpack\_packer.pyx", line 118, in msgpack._cmsgpack.Packer.__init__
TypeError: __init__() got an unexpected keyword argument 'encoding'
Press any key to continue . . .
mitchellspryn commented 4 years ago

I meant this one: image

See if this workaround helps you.

huckl3b3rry87 commented 4 years ago

Capture

huckl3b3rry87 commented 4 years ago

I just limited the verion, as you suggested

PS C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64> pip install "msgpack-numpy<0.4.4.0"
Collecting msgpack-numpy<0.4.4.0
  Using cached https://files.pythonhosted.org/packages/ad/45/464be6da85b5ca893cfcbd5de3b31a6710f636ccb8521b17bd4110a08d94/msgpack_numpy-0.4.3.2-py2.py3-none-any.whl
Requirement already satisfied: msgpack>=0.3.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from msgpack-numpy<0.4.4.0) (1.0.0)
Requirement already satisfied: numpy>=1.9.0 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from msgpack-numpy<0.4.4.0) (1.14.3)
Installing collected packages: msgpack-numpy
Successfully installed msgpack-numpy-0.4.3.2
You are using pip version 10.0.1, however version 20.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

but same issue

mitchellspryn commented 4 years ago

Hmm. This is odd. I just tried it on my end using the versions of packages that you have installed, and everything works.

Does the script run if you execute it outside of VS? Like from the anaconda command prompt?

For the record, here's my env:

absl-py==0.9.0
aiohttp==3.5.4
anaconda-client==1.7.2
anaconda-navigator==1.9.7
asn1crypto==1.3.0
astor==0.8.0
async-timeout==3.0.1
asyncio==3.4.3
attrs==19.3.0
backcall==0.1.0
beautifulsoup4==4.8.2
bleach==3.1.4
blinker==1.4
cachetools==3.1.1
certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
click==7.1.1
cloudpickle==1.2.2
clyent==1.2.2
colorama==0.4.3
conda==4.8.3
conda-build==3.18.7
conda-package-handling==1.6.0
cryptography==2.8
cycler==0.10.0
decorator==4.4.2
deepdish==0.3.6
defusedxml==0.6.0
deuces==0.2.1
entrypoints==0.3
filelock==3.0.12
Flask==1.1.1
future==0.18.1
gast==0.2.2
glob2==0.7
google-auth==1.13.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
graphviz==0.10.1
grpcio==1.28.1
gym==0.15.3
h5py==2.10.0
idna==2.9
idna-ssl==1.1.0
imageio==2.8.0
importlib-metadata==1.5.0
ipykernel==5.1.4
ipython==7.13.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
itsdangerous==1.1.0
jedi==0.16.0
Jinja2==2.11.1
joblib==0.14.1
json5==0.9.4
jsonpickle==1.2
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.2
jupyter-console==6.1.0
jupyter-core==4.6.3
jupyterlab==1.2.6
jupyterlab-server==1.1.0
Keras==2.3.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
keras-tqdm==2.0.1
keyboard==0.13.4
kiwisolver==1.1.0
libarchive-c==2.8
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.1.1
menuinst==1.4.16
mistune==0.8.4
mkl-fft==1.0.15
mkl-random==1.1.0
mkl-service==2.3.0
mock==2.0.0
mpmath==1.1.0
msgpack-python==0.5.6
msgpack-rpc-python==0.4.1
multidict==4.5.2
navigator-updater==0.2.1
nbconvert==5.6.1
nbformat==5.0.4
nest-asyncio==1.0.0
nose==1.3.7
notebook==6.0.3
numexpr==2.7.1
numpy==1.18.2
oauthlib==3.1.0
olefile==0.46
opt-einsum==3.2.0
pandas==0.24.2
pandocfilters==1.4.2
parso==0.6.2
pause==0.2
pbr==5.1.3
pickleshare==0.7.5
Pillow==7.0.0
pkginfo==1.5.0.1
plotly==4.6.0
pprofile==2.0.2
prometheus-client==0.7.1
prompt-toolkit==3.0.4
protobuf==3.8.0
psutil==5.7.0
psycopg2==2.8.4
py-heat==0.0.6
py-heat-magic==0.0.2
pyasn1==0.4.8
pyasn1-modules==0.2.7
pycosat==0.6.3
pycparser==2.20
pydot==1.4.1
pyglet==1.3.2
Pygments==2.6.1
PyHeat==0.2
PyJWT==1.7.1
pyOpenSSL==19.1.0
pyparsing==2.4.0
PyQt5==5.12.3
PyQt5-sip==4.19.18
PyQtWebEngine==5.12.1
pyreadline==2.1
pyrsistent==0.16.0
PySocks==1.7.1
python-dateutil==2.8.1
pytz==2019.3
pywin32==227
pywinpty==0.5.7
PyYAML==5.3.1
pyzmq==18.1.1
qtconsole==4.7.2
QtPy==1.9.0
requests==2.23.0
requests-oauthlib==1.3.0
retrying==1.3.3
rsa==4.0
ruamel-yaml==0.15.87
scikit-learn==0.22.1
scipy==1.4.1
Send2Trash==1.5.0
Shapely==1.6.4.post2
six==1.14.0
soupsieve==2.0
sympy==1.5.1
tables==3.6.1
tb-nightly==1.14.0a20190603
tensorboard==2.1.0
tensorflow==2.1.0
tensorflow-estimator==2.1.0
tensorflow-gpu-estimator==2.1.0
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
tf-estimator-nightly==1.14.0.dev2019060501
tornado==6.0.4
tqdm==4.44.1
traitlets==4.3.3
typing-extensions==3.7.4
tzlocal==2.0.0
urllib3==1.25.8
wcwidth==0.1.9
webencodings==0.5.1
Werkzeug==0.14.1
widgetsnbextension==3.5.1
win-inet-pton==1.1.0
wincertstore==0.2
wrapt==1.12.1
yarl==1.3.0
zipp==2.2.0
huckl3b3rry87 commented 4 years ago

@mitchellspryn thank you so much for your help:)

If I run Anaconda in the PowerShell, I get the same issue"

PS C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot> python.exe .\ArmClientTest.py
Traceback (most recent call last):
  File ".\ArmClientTest.py", line 45, in <module>
    main()
  File ".\ArmClientTest.py", line 17, in main
    client = ArmClient.ArmClient()
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot\ArmClient.py", line 9, in __init__
    self.airsim_client.confirmConnection();
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\airsim\client.py", line 54, in confirmConnection
    if self.ping():
  File "C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\airsim\client.py", line 24, in ping
    return self.client.call('ping')
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\session.py", line 41, in call
    return self.send_request(method, args).get()
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\session.py", line 51, in send_request
    self._transport.send_message([message.REQUEST, msgid, method, args])
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 89, in send_message
    self.connect()
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 98, in connect
    socket = ClientSocket(stream, self, self._encodings)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 53, in __init__
    BaseSocket.__init__(self, stream, encodings)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py", line 12, in __init__
    self._packer = msgpack.Packer(encoding=encodings[0], default=lambda x: x.to_msgpack())
  File "msgpack\_packer.pyx", line 118, in msgpack._cmsgpack.Packer.__init__
TypeError: __init__() got an unexpected keyword argument 'encoding'
PS C:\Users\admin\Documents\workspace\UDDS_URDF\B\PythonClient\urdfbot>
huckl3b3rry87 commented 4 years ago

for reference, here are my packages, I started changing to the some of the ones you have, but still no luck

PS C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64> pip list
Package                            Version
---------------------------------- ---------
alabaster                          0.7.10
anaconda-client                    1.6.14
anaconda-navigator                 1.8.7
anaconda-project                   0.8.2
asn1crypto                         0.24.0
astroid                            1.6.3
astropy                            3.0.2
attrs                              18.1.0
Babel                              2.5.3
backcall                           0.1.0
backports.shutil-get-terminal-size 1.0.0
beautifulsoup4                     4.6.0
bitarray                           0.8.1
bkcharts                           0.2
blaze                              0.11.3
bleach                             2.1.3
bokeh                              0.12.16
boto                               2.48.0
Bottleneck                         1.2.1
certifi                            2018.4.16
cffi                               1.11.5
chardet                            3.0.4
click                              6.7
cloudpickle                        0.5.3
clyent                             1.2.2
colorama                           0.3.9
comtypes                           1.1.4
conda                              4.5.4
conda-build                        3.10.5
conda-verify                       2.0.0
contextlib2                        0.5.5
cryptography                       2.2.2
cycler                             0.10.0
Cython                             0.28.2
cytoolz                            0.9.0.1
dask                               0.17.5
datashape                          0.5.4
decorator                          4.3.0
distributed                        1.21.8
docutils                           0.14
entrypoints                        0.2.3
et-xmlfile                         1.0.1
fastcache                          1.0.2
filelock                           3.0.4
Flask                              1.0.2
Flask-Cors                         3.0.4
gevent                             1.3.0
glob2                              0.6
greenlet                           0.4.13
h5py                               2.7.1
heapdict                           1.0.0
html5lib                           1.0.1
idna                               2.6
imageio                            2.3.0
imagesize                          1.0.0
importlib-metadata                 1.6.0
ipykernel                          4.8.2
ipython                            6.4.0
ipython-genutils                   0.2.0
ipywidgets                         7.2.1
isort                              4.3.4
itsdangerous                       0.24
jdcal                              1.4
jedi                               0.12.0
Jinja2                             2.10
jsonpickle                         1.4.1
jsonschema                         2.6.0
jupyter                            1.0.0
jupyter-client                     5.2.3
jupyter-console                    5.2.0
jupyter-core                       4.4.0
jupyterlab                         0.32.1
jupyterlab-launcher                0.10.5
keyboard                           0.13.5
kiwisolver                         1.0.1
lazy-object-proxy                  1.3.1
llvmlite                           0.23.1
locket                             0.2.0
lxml                               4.2.1
MarkupSafe                         1.0
matplotlib                         2.2.2
mccabe                             0.6.1
menuinst                           1.4.14
mistune                            0.8.3
mkl-fft                            1.0.0
mkl-random                         1.0.1
more-itertools                     4.1.0
mpmath                             1.0.0
msgpack                            1.0.0
msgpack-numpy                      0.4.3.2
msgpack-python                     0.5.6
msgpack-rpc-python                 0.4.1
multipledispatch                   0.5.0
navigator-updater                  0.2.1
nbconvert                          5.3.1
nbformat                           4.4.0
networkx                           2.1
nltk                               3.3
nose                               1.3.7
notebook                           5.5.0
numba                              0.38.0
numexpr                            2.6.5
numpy                              1.14.3
numpydoc                           0.8.0
odo                                0.5.1
olefile                            0.45.1
openpyxl                           2.5.3
packaging                          17.1
pandas                             0.23.0
pandocfilters                      1.4.2
parso                              0.2.0
partd                              0.3.8
path.py                            11.0.1
pathlib2                           2.3.2
patsy                              0.5.0
pep8                               1.7.1
pickleshare                        0.7.4
Pillow                             5.1.0
pip                                10.0.1
pkginfo                            1.4.2
pluggy                             0.6.0
ply                                3.11
prompt-toolkit                     1.0.15
psutil                             5.4.5
py                                 1.5.3
pycodestyle                        2.4.0
pycosat                            0.6.3
pycparser                          2.18
pycrypto                           2.6.1
pycurl                             7.43.0.1
pyflakes                           1.6.0
Pygments                           2.2.0
pylint                             1.8.4
pyodbc                             4.0.23
pyOpenSSL                          18.0.0
pyparsing                          2.2.0
PySocks                            1.6.8
pytest                             3.5.1
pytest-arraydiff                   0.2
pytest-astropy                     0.3.0
pytest-doctestplus                 0.1.3
pytest-openfiles                   0.3.0
pytest-remotedata                  0.2.1
python-dateutil                    2.7.3
pytz                               2018.4
PyWavelets                         0.5.2
pywin32                            223
pywinpty                           0.5.1
PyYAML                             3.12
pyzmq                              17.0.0
QtAwesome                          0.4.4
qtconsole                          4.3.1
QtPy                               1.4.1
requests                           2.18.4
rope                               0.10.7
ruamel-yaml                        0.15.35
scikit-image                       0.13.1
scikit-learn                       0.19.1
scipy                              1.1.0
seaborn                            0.8.1
Send2Trash                         1.5.0
setuptools                         39.1.0
simplegeneric                      0.8.1
singledispatch                     3.4.0.3
six                                1.11.0
snowballstemmer                    1.2.1
sortedcollections                  0.6.1
sortedcontainers                   1.5.10
Sphinx                             1.7.4
sphinxcontrib-websupport           1.0.1
spyder                             3.2.8
SQLAlchemy                         1.2.7
statsmodels                        0.9.0
sympy                              1.1.1
tables                             3.4.3
tblib                              1.3.2
terminado                          0.8.1
testpath                           0.3.1
toolz                              0.9.0
tornado                            4.5.3
traitlets                          4.3.2
typing                             3.6.4
unicodecsv                         0.14.1
urllib3                            1.22
wcwidth                            0.1.7
webencodings                       0.5.1
Werkzeug                           0.14.1
wheel                              0.31.1
widgetsnbextension                 3.2.1
win-inet-pton                      1.0.1
win-unicode-console                0.5
wincertstore                       0.2
wrapt                              1.10.11
xlrd                               1.1.0
XlsxWriter                         1.0.4
xlwings                            0.11.8
xlwt                               1.3.0
zict                               0.1.3
zipp                               3.1.0

strange, when I look at the packages in the Solution explorer, it seems to be missing some

msgpack                            1.0.0
msgpack-numpy                      0.4.3.2
msgpack-rpc-python                 0.4.1

A unless they are contained in something else

in the Anaconda 5.2.0 interactive window in VS

>>> import msgpackrpc
>>> msgpackrpc.__version__
'0.4.1'
mitchellspryn commented 4 years ago

Oh. That's actually a good catch. That means that the environment that VS is using is different from the one you're inspecting.

I notice that you have 2 anacondas installed. Could you be using the wrong one? What happens if you select the other one?

Probably not relevant, but I am on conda 4.8.3 instead of 4.5.4.

The nuclear solution is to go into the file having the error (C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpackrpc\transport\tcp.py), and remove the "encodings" kwarg, but I'm not sure if that'd have other problems.

huckl3b3rry87 commented 4 years ago

First I installed anaconda directly on windows, then I realized I could add it to my VS build, which I did and that is the one I think that I am using

If I switch to the one on my machine

AA

Then I have to start installing some missing packages, which I did on the anaconda version that I added directly to my VS A

huckl3b3rry87 commented 4 years ago

for reference, I had to install

pip install msgpack
pip install msgpack-rpc-python
pip install keyboard
pip install jsonpickle

but I did not try it on the Anaconda that I first installed just with Windows

mitchellspryn commented 4 years ago

I see.

What happens if you run this code? Do you get a traceback?

import msgpack
p = msgpack.Packer(encoding='UTF-8', default=lambda x: x.to_msgpack())
huckl3b3rry87 commented 4 years ago
Anaconda 5.2.0 interactive window [PTVS 15.9.18254.1-15.0]
Type $help for a list of commands.
>>> import msgpack
>>> p = msgpack.Packer(encoding='UTF-8', default=lambda x: x.to_msgpack())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "msgpack\_packer.pyx", line 118, in msgpack._cmsgpack.Packer.__init__
TypeError: __init__() got an unexpected keyword argument 'encoding' 
mitchellspryn commented 4 years ago

Ok, great. It runs fine for me. Progress.

What is in C:\ProgramData\Anaconda3\Lib\site-packages\msgpack_version.py? (might be C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\lib\site-packages\msgpack_version.py for you)? I have this:

version = (0, 5, 6)
mitchellspryn commented 4 years ago

I think I see the problem. Can you uninstall msgpack, msgpack-python, msgpack-rpc-python, and msgpack-numpy. Then, reinstall msgpack-python and msgpack-rpc-python, leaving out msgpack and msgpack-numpy?

Then try running that snippet above. Hopefully, it should run without error.

huckl3b3rry87 commented 4 years ago

I should have mentioned that, yeah I had to add msgpack to install msgpack-python I just did what you said and started to add the packages and got

PS C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64> pip install msgpack-python
Collecting msgpack-python
  Using cached https://files.pythonhosted.org/packages/8a/20/6eca772d1a5830336f84aca1d8198e5a3f4715cd1c7fc36d3cc7f7185091/msgpack-python-0.5.6.tar.gz
Building wheels for collected packages: msgpack-python
  Running setup.py bdist_wheel for msgpack-python ... done
  Stored in directory: C:\Users\admin\AppData\Local\pip\Cache\wheels\d5\de\86\7fa56fda12511be47ea0808f3502bc879df4e63ab168ec0406
Successfully built msgpack-python
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: msgpack-python
Successfully installed msgpack-python-0.5.6
You are using pip version 10.0.1, however version 20.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
mitchellspryn commented 4 years ago

Odd. What happens if you just remove msgpack?

huckl3b3rry87 commented 4 years ago

I guess it installed, it just gave this red issue

distributed 1.21.8 requires msgpack, which is not installed.

so, last time, I installed msgpack

Currently I don't have msgpack. Maybe it will work?

mitchellspryn commented 4 years ago

This is strange. I nuked it from my system and installed, and I didn't get any warnings. Try the snippet above and see if it imports correctly and runs without error.

huckl3b3rry87 commented 4 years ago

works!

Anaconda 5.2.0 interactive window [PTVS 15.9.18254.1-15.0]
Type $help for a list of commands.
>>> import msgpack
>>> p = msgpack.Packer(encoding='UTF-8', default=lambda x: x.to_msgpack())
>>> 

So, during installation, make sure not to install msgpack

Just install

msgpack-python
msgpack-rpc-python
pip install keyboard
pip install jsonpickle
huckl3b3rry87 commented 4 years ago

And!! The URDF robot is moving around amazingly:)

Thank you so much @mitchellspryn !

mitchellspryn commented 4 years ago

Great. Glad we could get it up and running.

huckl3b3rry87 commented 4 years ago

same:)