question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin install doesn't install the websocket-client package needed by the terminal (IEP-656)

See original GitHub issue

When you try to open a terminal the first time after a clean install of esp-idf and ide-eclipse-plugin, you get…

Traceback (most recent call last):
  File "/usr/src/mcu/esp32/esp-idf-v4.4/tools/idf_monitor_base/web_socket_client.py", line 57, in _connect
    self.ws = websocket.create_connection(self.url)
NameError: name 'websocket' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/mcu/esp32/esp-idf-v4.4/tools/idf_monitor.py", line 351, in <module>
    main()
  File "/usr/src/mcu/esp32/esp-idf-v4.4/tools/idf_monitor.py", line 299, in main
    ws = WebSocketClient(args.ws) if args.ws else None
  File "/usr/src/mcu/esp32/esp-idf-v4.4/tools/idf_monitor_base/web_socket_client.py", line 47, in __init__
    self._connect()
  File "/usr/src/mcu/esp32/esp-idf-v4.4/tools/idf_monitor_base/web_socket_client.py", line 60, in _connect
    raise RuntimeError('Please install the websocket_client package for IDE integration!')
RuntimeError: Please install the websocket_client package for IDE integration!

This should really be taken care of by the installer or at least there should be clearer instructions without the backtrace. For instance, you need to run pip install websocket-client from a shell that already has had the esp-idf export.sh script sourced.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
Evanshioncommented, Nov 23, 2022

Hi! I did as you suggested: Espressif -> ESP-IDF Tools Manager -> Install Tools And it worked! Thank you very much for support! BR

Il giorno mer 23 nov 2022 alle ore 10:28 Denys Almazov < @.***> ha scritto:

Hi @undergnd https://github.com/undergnd, @Evanshion https://github.com/Evanshion,

sorry for the late reply. We tried to reproduce this problem but were unable to. Also, we added installing WebSocket packages directly into the Install Tools process, so my guess is you having this issue because something is going wrong during tools installation. Can you provide the install tools log, so we could check, please? To install tools from IDE: Espressif -> ESP-IDF Tools Manager -> Install Tools

It looks like the issue still exist - I’ve just installed IDE, newest plugins and tried the above proposals of solution. When I use “idf.py -p COM2 monitor” in Windows 10 console, it works as expected. In IDE I see the below:

It can be because a different python environment (check <user_name>/.espressif/python_env path) is set for these processes. You can also check environment variables inside IDE: Preferences -> C/C++ -> Build -> Environment -> IDF_PYTHON_ENV_PATH Then check if python from IDF_PYTHON_ENV_PATH contains websocket site-packeges. For example, in the folder .espressif\python_env\idf5.1_py3.8_env\Lib\site-packages I have 2 folders related to WebSocket websocket and websocket_client-1.4.1.dist-info

— Reply to this email directly, view it on GitHub https://github.com/espressif/idf-eclipse-plugin/issues/496#issuecomment-1324766820, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4AF77AH6NV3RT6HHNP3K33WJXPTZANCNFSM5PLRALGA . You are receiving this because you were mentioned.Message ID: @.***>

0reactions
undergndcommented, Nov 25, 2022

“Espressif -> ESP-IDF Tools Manager -> Install Tools” works for me as well - I had just to fill python and git paths. Thanks and Regards Greg

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESP-IDF Eclipse Plugin and Espressif IDE 2.5.0 Release
IEP-656 : Plugin install doesn't install the websocket-client package needed by the terminal - IEP-679: Auto change the launch target after ...
Read more >
websocket-client - PyPI
WebSocket client for Python with low level API options. ... You can use either python3 setup.py install or pip3 install websocket-client to install....
Read more >
How to Install websocket-client in Python? - Finxter
Open your Linux terminal or shell; Type “ pip install websocket-client ” (without quotes), hit Enter. If it doesn't work, try "pip3 install...
Read more >
Samsung TV: what is pip3 install websocket-client
I need this to setup samsung tv on home assistant. just like you noted: pip3 install websocket-client. You can then run samsungctl to...
Read more >
No module named 'websocket' - python - Stack Overflow
First, you need to install pip if you don't have it. Type pip in your terminal or cmd to see if it is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found