Welcome to the Linux Foundation Forum!

TypeError: 'NoneType' object is not iterable Kail Linux

schism Posts: 11

Hi, I am installing Empire on Kali Linux. When I run "./reset.sh" it starts up fine to the Empire screen. Then I ran ./"install.sh" and "./Cert.sh". Now when I enter "./empire" I get the error:
TypeError: 'NoneType' object is not iterable
How do I fix this so I can run Empire? Please reply. Thanks I am attaching a screenshot..


  • schism
    schism Posts: 11

    Hi, thanks for your fast reply. I am following a book that told me to install in /opt/Empire/. I checked your link and see I can install it anywhere. Your link says to run "./empire" in /Empire also. Is that correct?

  • schism
    schism Posts: 11

    I tried ./reset.sh and then ./empire and it worked. How do I get it to work after ./install.sh and ./cert.sh? Installing is slow then it says it's finished. Then I get the above error. Any ideas?

  • schism
    schism Posts: 11

    Hello, I tried installing outside of /opt and ran install.sh and NOT cert.sh and now it works fine. Thanks you for the help

  • when i run "./reset.sh",i often got a reply that Type Error:'NoneType' Object is not iterable.who can tell me what should i do?please!

  • This error means that python is trying to iterate over a None object. With Python, you can only iterate over an object if that object has a value. This is because iterable objects only have a next item which can be accessed if their value is not equal to None. If you try to iterate over a None object, you encounter the TypeError: ‘NoneType’ object is not iterable error.

    For example, list.sort() only change the list but return None.

    Python's interpreter converted your code to pyc bytecode. The Python virtual machine processed the bytecode, it encountered a looping construct which said iterate over a variable containing None. The operation was performed by invoking the __iter__ method on the None. None has no __iter__ method defined, so Python's virtual machine tells you what it sees: that NoneType has no__iter__method.

    Technically, you can avoid the NoneType exception by checking if a value is equal to None before you iterate over that value.


Upcoming Training