Title: [Python 3.13] ModuleNotFoundError: No module named 'imghdr' · Issue #24 · appium/mitmproxy-java · GitHub
Open Graph Title: [Python 3.13] ModuleNotFoundError: No module named 'imghdr' · Issue #24 · appium/mitmproxy-java
X Title: [Python 3.13] ModuleNotFoundError: No module named 'imghdr' · Issue #24 · appium/mitmproxy-java
Description: Steps to reproduce: Install pyenv Python package manager Install python 3.13.3 pyenv install 3.13.3 Make python 3.13.3. global pyenv global 3.13.3 Install mitmproxy version 9.0.0 pipx install mitmproxy==9.0.0 install websockets pipx inst...
Open Graph Description: Steps to reproduce: Install pyenv Python package manager Install python 3.13.3 pyenv install 3.13.3 Make python 3.13.3. global pyenv global 3.13.3 Install mitmproxy version 9.0.0 pipx install mitmp...
X Description: Steps to reproduce: Install pyenv Python package manager Install python 3.13.3 pyenv install 3.13.3 Make python 3.13.3. global pyenv global 3.13.3 Install mitmproxy version 9.0.0 pipx install mitmp...
Opengraph URL: https://github.com/appium/mitmproxy-java/issues/24
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Python 3.13] ModuleNotFoundError: No module named 'imghdr'","articleBody":"\n\n### Steps to reproduce:\n\n- Install [pyenv](https://github.com/pyenv/pyenv) Python package manager\n\n- Install python 3.13.3\n\n`pyenv install 3.13.3`\n\n- Make python 3.13.3. global\n\n`pyenv global 3.13.3`\n\n- Install mitmproxy version 9.0.0\n\n`pipx install mitmproxy==9.0.0`\n\n- install websockets\n\n`pipx install websockets\n`\n- Run mitmproxy from terminal\n\n`mitmproxy or mitmproxy --version`\n\n### Actual Result:\n\n```shell\nTraceback (most recent call last):\n File \"/Users/john.doe/.local/bin/mitmproxy\", line 8, in \u003cmodule\u003e\n sys.exit(mitmproxy())\n ~~~~~~~~~^^\n File \"/Users/john.doe/.local/pipx/venvs/mitmproxy/lib/python3.13/site-packages/mitmproxy/tools/main.py\", line 124, in mitmproxy\n from mitmproxy.tools import console\n File \"/Users/john.doe/.local/pipx/venvs/mitmproxy/lib/python3.13/site-packages/mitmproxy/tools/console/__init__.py\", line 1, in \u003cmodule\u003e\n from mitmproxy.tools.console import master\n File \"/Users/john.doe/.local/pipx/venvs/mitmproxy/lib/python3.13/site-packages/mitmproxy/tools/console/master.py\", line 27, in \u003cmodule\u003e\n from mitmproxy.tools.console import consoleaddons\n File \"/Users/john.doe/.local/pipx/venvs/mitmproxy/lib/python3.13/site-packages/mitmproxy/tools/console/consoleaddons.py\", line 7, in \u003cmodule\u003e\n from mitmproxy import contentviews\n File \"/Users/john.doe/.local/pipx/venvs/mitmproxy/lib/python3.13/site-packages/mitmproxy/contentviews/__init__.py\", line 21, in \u003cmodule\u003e\n from . import (\n ...\u003c17 lines\u003e...\n )\n File \"/Users/john.doe/.local/pipx/venvs/mitmproxy/lib/python3.13/site-packages/mitmproxy/contentviews/image/__init__.py\", line 1, in \u003cmodule\u003e\n from .view import ViewImage\n File \"/Users/john.doe/.local/pipx/venvs/mitmproxy/lib/python3.13/site-packages/mitmproxy/contentviews/image/view.py\", line 1, in \u003cmodule\u003e\n import imghdr\nModuleNotFoundError: No module named 'imghdr'\n```\n\n### Expected Result:\n\nmitmproxy should start as usual in interactive mode from terminal and starts capturing the network traffic if proxy is set correctly, or it should display the version as it displays when downgraded python to 3.11.8\n\n```shell\nMitmproxy: 9.0.1\nPython: 3.11.8\nOpenSSL: OpenSSL 3.0.7 1 Nov 2022\nPlatform: macOS-15.4-arm64-arm-64bit\n```\n\n### More Information\nIt seems that this modeule has been marked deprecated and removed from the latest python\nhttps://peps.python.org/pep-0594/#imghdr\n\n\n### Test Environment\nMac Silicon chip\nmacOS Sequoia 15.4\nwebsockets 15.0.1\n\n\n\n\n\n\n","author":{"url":"https://github.com/itkhanz","@type":"Person","name":"itkhanz"},"datePublished":"2025-04-15T08:51:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/24/mitmproxy-java/issues/24"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c95c5197-33a5-48f6-fe0d-a98c359a6583 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5B4:2EC466:15FF537:1CA77E0:697D55E1 |
| html-safe-nonce | 73bd8e87742aaabcad234061c50e1f5c845889c20e545ee33e46db8bf80507fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUI0OjJFQzQ2NjoxNUZGNTM3OjFDQTc3RTA6Njk3RDU1RTEiLCJ2aXNpdG9yX2lkIjoiNzU4OTY5MTUzNTc4ODk1NTEwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 83a4244ff5f6f7372cd2ea412d9e4bb56db7773ae658c8de0b61715bcd4e5269 |
| hovercard-subject-tag | issue:2995678907 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/appium/mitmproxy-java/24/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2c294b0318e4393a8a9b56964ee204d82cf2821751a0076ee73f28171675032d/appium/mitmproxy-java/issues/24 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2c294b0318e4393a8a9b56964ee204d82cf2821751a0076ee73f28171675032d/appium/mitmproxy-java/issues/24 |
| og:image:alt | Steps to reproduce: Install pyenv Python package manager Install python 3.13.3 pyenv install 3.13.3 Make python 3.13.3. global pyenv global 3.13.3 Install mitmproxy version 9.0.0 pipx install mitmp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | itkhanz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/appium/mitmproxy-java git https://github.com/appium/mitmproxy-java.git |
| octolytics-dimension-user_id | 3221291 |
| octolytics-dimension-user_login | appium |
| octolytics-dimension-repository_id | 181068418 |
| octolytics-dimension-repository_nwo | appium/mitmproxy-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 181068418 |
| octolytics-dimension-repository_network_root_nwo | appium/mitmproxy-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width