CounterFit-IoT / CounterFit

A simulator for IoT sensors and actuators. This creates fake virtual sensors and actuators when the real ones won't fit on your counter đŸ¤ª.
MIT License
200 stars 65 forks source link

Unable to run CounterFit on VS Code #28

Open stridefox opened 9 months ago

stridefox commented 9 months ago

Hi, I have been trying to learn IoT and I found out about CounterFit. While it worked earlier on, it is not working now. Issue seems to be with a module under werkzeug. I have uninstalled and reinstalled the module along with its requirements. I am still unable to figure out the issue. Please help.

 (CodeIoT) D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Scripts>counterfit
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Scripts\counterfit.exe\__main__.py", line 4, in <module>
  File "D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Lib\site-packages\CounterFit\counterfit.py", line 11, in <module>
    from eventlet import event
  File "D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Lib\site-packages\eventlet\__init__.py", line 17, in <module>
    from eventlet import convenience
  File "D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Lib\site-packages\eventlet\convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Lib\site-packages\eventlet\green\socket.py", line 21, in <module>
    from eventlet.support import greendns
  File "D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Lib\site-packages\eventlet\support\greendns.py", line 45, in <module>
    from eventlet.green import ssl
  File "D:\Rohan S Gurumurthy\Coding\Python\IoT\CodeIoT\Lib\site-packages\eventlet\green\ssl.py", line 25, in <module>
    _original_wrap_socket = __ssl.wrap_socket
                            ^^^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'
Riccardo126 commented 7 months ago

Seems new version of werkzeug deprecated a method that can cause some problems. Just for temporary workaround its possible to do pip uninstall werkzeug and then pip install werkzeug==2.0.0 Let me know if this solves the issue

stridefox commented 7 months ago

Hello Ricardo, This solution works. Thanks for your input!

Regards, Rohan

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Riccardo126 @.> Sent: Wednesday, February 28, 2024 3:30:52 AM To: CounterFit-IoT/CounterFit @.> Cc: Rohan S Gurumurthy @.>; Author @.> Subject: Re: [CounterFit-IoT/CounterFit] Unable to run CounterFit on VS Code (Issue #28)

Seems new version of werkzeug deprecated a method that can cause some problems. Just for temporary workaround its possible to do pip uninstall werkzeug and then pip install werkzeug==2.0.0 Let me know if this solves the issue

— Reply to this email directly, view it on GitHubhttps://github.com/CounterFit-IoT/CounterFit/issues/28#issuecomment-1967688463, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDLUXYDUM3UWCF57MC63RUTYVZJRJAVCNFSM6AAAAABAZXG6MKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRXGY4DQNBWGM. You are receiving this because you authored the thread.Message ID: @.***>