mitmproxy / mitmproxy/mitmproxy

No module named '__mitmproxy_script__'

Open
#3,372 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/addons kind/feature
Dominant language
Python
Stars
45.1k
Forks
4.7k
Avg merge
21h 12m
Merged PRs (30d)
16

Description

In a directory like:

proxy/
├── init.py
├── handler.py
└── submit.py

I got the following message:

in script handler.py: No module named 'mitmproxy_script'

when I run

mitmdump -s handler.py -p 6000

with the following code in handler.py
from .submit import Foo

and it is okay if i use
from submit import Foo

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with the proxy/ directory layout, handler.py, submit.py, and mitmdump -s handler.py -p 6000. Start by tracing mitmdump's script-loading and import handling, then compare the relative and non-relative imports. Done means the reported behavior is fixed or its supported import behavior is clearly established by tests or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.