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

Problem running counterfit Ubuntu #19

Closed jcaldeira1977 closed 1 year ago

jcaldeira1977 commented 1 year ago

Hi,

Until today I was able to install and run counterfit on my VM Ubuntu 20.04 with python3.8.10.

Today after a successful counterfit installation (pip install CounterFit) when I try to run it I get the following error:

ubuntu@ubunu2004:$ counterfit Traceback (most recent call last): File "/home/ubuntu/.local/bin/counterfit", line 5, in from CounterFit.counterfit import main File "/home/ubuntu/.local/lib/python3.8/site-packages/CounterFit/counterfit.py", line 9, in from eventlet import event File "/home/ubuntu/.local/lib/python3.8/site-packages/eventlet/init.py", line 17, in from eventlet import convenience File "/home/ubuntu/.local/lib/python3.8/site-packages/eventlet/convenience.py", line 7, in from eventlet.green import socket File "/home/ubuntu/.local/lib/python3.8/site-packages/eventlet/green/socket.py", line 21, in from eventlet.support import greendns File "/home/ubuntu/.local/lib/python3.8/site-packages/eventlet/support/greendns.py", line 66, in setattr(dns, pkg, import_patched('dns.' + pkg)) File "/home/ubuntu/.local/lib/python3.8/site-packages/eventlet/support/greendns.py", line 61, in import_patched return patcher.import_patched(module_name, **modules) File "/home/ubuntu/.local/lib/python3.8/site-packages/eventlet/patcher.py", line 132, in import_patched return inject( File "/home/ubuntu/.local/lib/python3.8/site-packages/eventlet/patcher.py", line 109, in inject module = import(module_name, {}, {}, module_name.split('.')[:-1]) File "/home/ubuntu/.local/lib/python3.8/site-packages/dns/zone.py", line 86, in class Zone(dns.transaction.TransactionManager): File "/home/ubuntu/.local/lib/python3.8/site-packages/dns/zone.py", line 757, in Zone ) -> dns.rdtypes.ANY.SOA.SOA: AttributeError: module 'dns.rdtypes' has no attribute 'ANY' ubuntu@ubunu2004:$

Can I get some help solving this issue?

Thanks.

scriptdruid commented 1 year ago

@jcaldeira1977 I have the same error, were you able to find a fix ? - thanks!

scriptdruid commented 1 year ago

@jcaldeira1977 - I found a temporary solution, it has to do with the package dnspython. Run pip install dnspython==2.2.1 This should fix the issue.

Ref - https://stackoverflow.com/questions/75137717/eventlet-dns-python-attribute-error-module-dns-rdtypes-has-no-attribute-any

jcaldeira1977 commented 1 year ago

@vipulrai91 I managed to solve the problem with the same solution you propose.

Glad you managed it too, I forgot to post it when I found it.