Skip to content

Bug: ModuleNotFoundError for wcwidth when running oneshot.py in Termux #1

Description

@libra1024

Describe the bug

When attempting to run oneshot.py on Termux, the script fails to execute due to a missing Python library: wcwidth (ModuleNotFoundError).

Attempting to fix this by using apt install wcwidth does not work because apt searches for native Termux system packages, not Python modules.

To Reproduce

Steps to reproduce the behavior in Termux:

  1. Follow the manual installation steps for Termux in the README.
  2. Execute the script: sudo python OneShot/oneshot.py -i wlan0 -K
  3. See the ModuleNotFoundError for wcwidth.

Root Cause

The Python dependency wcwidth is not installed by default in the Termux environment or via the currently documented pkg install commands.

Proposed Solution

The module must be installed via the Python package manager (pip).

  1. Install the dependency with pip:

    pip install wcwidth
  2. Root environment fallback:
    Since the script is executed as a superuser (sudo), the root Python environment might have separate paths. If the error persists after step 1, install it directly in the root environment:

    sudo pip install wcwidth
  3. Run the script again:

    sudo python OneShot/oneshot.py -i wlan0 -K

Suggested Action

Update the Termux section in the README.md to include instructions for installing wcwidth via pip.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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