microsoft / IoT-For-Beginners

12 Weeks, 24 Lessons, IoT for All!
https://microsoft.github.io/IoT-For-Beginners/
MIT License
15.17k stars 2.37k forks source link

Counterfit does not work #487

Open stridefox opened 8 months ago

stridefox commented 8 months ago

Hi! I have been trying to run counterfit on my system. I have had it successfully installed, but when its time to 'counterfit', I am getting an error message saying the following:-

(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 ^^^^^^^^^^^^^^^^^

I would appreciate any help I can get.

raspberrymilkyway commented 1 month ago

I ended up swapping to Python 3.11.9, since the eventlet/SSL issue is only an issue with Python 3.12.x, to my understanding (https://github.com/eventlet/eventlet/issues/795).

This led me to another issue ("cannot import name 'url_quote' from 'werkzeug.urls'"), which can be worked around by installing a lower version of Werkzeug (https://github.com/CounterFit-IoT/CounterFit/issues/30).