Skip to content

UnboundLocalError: cannot access local variable 'f' where it is not associated with a value #17

@Prakash9771

Description

@Prakash9771

$ python3 wifijammer.py
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/scapy/arch/linux.py", line 125, in get_if_list
f = open("/proc/net/dev", "rb")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/proc/net/dev'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/data/com.termux/files/home/wifijammer/wifijammer.py", line 14, in
from scapy.sendrecv import sniff
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/scapy/sendrecv.py", line 35, in
import scapy.route # noqa: F401
^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/scapy/route.py", line 203, in
conf.iface = get_working_if()
^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/scapy/arch/linux.py", line 144, in get_working_if
for i in get_if_list():
^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/scapy/arch/linux.py", line 127, in get_if_list
f.close()
^
UnboundLocalError: cannot access local variable 'f' where it is not associated with a value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions