evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
10.74k stars 498 forks source link

'Namespace' object is not iterable #80

Closed cwh1te closed 7 years ago

cwh1te commented 7 years ago

Followed setup instructions in Python 3.5.3 on Ubuntu 17.04 and get the following output when I run it:

WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6
Traceback (most recent call last):
  File "/usr/local/bin/opensnitch", line 4, in <module>
    __import__('pkg_resources').run_script('opensnitch==0.0.2', 'opensnitch')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1494, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.5/dist-packages/opensnitch-0.0.2-py3.5.egg/EGG-INFO/scripts/opensnitch", line 46, in <module>
    (options, args) = parser.parse_args()
TypeError: 'Namespace' object is not iterable

I also tried running it from the bin directory with sudo python3 opensnitch which gives basically the same result:

WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6
Traceback (most recent call last):
  File "opensnitch", line 46, in <module>
    (options, args) = parser.parse_args()
TypeError: 'Namespace' object is not iterable

Any help or advice would be appreciated - I'd really like to try this thing. =)

cwh1te commented 7 years ago

Looking at recent commits, I think this problem may have been introduced today with the change from OptionParser to ArgumentParser. The object returned by parser.parse_args() if of type Namespace - it's not a tuple.

EDIT: I see that @adisbladis just pushed a change that fixes this: https://github.com/evilsocket/opensnitch/commit/a3852e10da30d248e4a02f7c6d3284498bbee70c