NanmiCoder / NanmiCoder/MediaCrawler

[BUG]

Open
#683 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
65.3k
Forks
12.6k
PR merge metrics
No merged PRs in 30d

Description

🔍 问题检查清单

  • 我已经仔细阅读了项目使用过程中的常见问题汇总
  • 我已经搜索并查看了已关闭的issues
  • 我确认这不是由于滑块验证码、Cookie过期、Cookie提取错误、平台风控等常见原因导致的问题

🐛 问题描述

最新代码运行不起来
回滚至 2025/7/28 的版本 29358418 恢复正常

📝 复现步骤

  1. uv run main.py --help 直接报错

💻 运行环境

  • 操作系统:
  • Python版本: 3.9

📋 错误日志

Traceback (most recent call last):
  File "E:\ng\mecraw\MediaCrawler\main.py", line 16, in <module>
    import cmd_arg
  File "E:\ng\mecraw\MediaCrawler\cmd_arg\__init__.py", line 12, in <module>
    from .arg import *
  File "E:\ng\mecraw\MediaCrawler\cmd_arg\arg.py", line 15, in <module>
    from tools.utils import str2bool
  File "E:\ng\mecraw\MediaCrawler\tools\utils.py", line 15, in <module>
    from .crawler_util import *
  File "E:\ng\mecraw\MediaCrawler\tools\crawler_util.py", line 30, in <module>
    from proxy.proxy_ip_pool import IpInfoModel
  File "E:\ng\mecraw\MediaCrawler\proxy\__init__.py", line 16, in <module>
    from .base_proxy import *
  File "E:\ng\mecraw\MediaCrawler\proxy\base_proxy.py", line 24, in <module>
    from tools.utils import utils
ImportError: cannot import name 'utils' from partially initialized module 'tools.utils' (most likely due to a circular import) (E:\ng\mecraw\MediaCrawler\tools\utils.py)

📷 错误截图

Contributor guide

No contributing guide indexed for this repository

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

Start by running uv run main.py --help on Python 3.9 and trace the imports through main.py, cmd_arg/arg.py, tools/utils.py, tools/crawler_util.py, and proxy/base_proxy.py. Identify the circular import reported in the traceback and verify that the command starts successfully without the ImportError.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.