Skip to content

[Bug]压缩包打包zip格式打包好 用网页上传插件报错 #7604

@Snian629

Description

@Snian629

What happened / 发生了什么

zip格式打包好 用网页上传插件报错 提示无法安装报错 然后重启astrbot安装好了

Reproduce / 如何复现?

1.自己魔改了插件然后上传astrbot的控制ui
2.发生报错请看下方
3.然后重启astrbot
4.重启之后插件正常安装好

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

Linux 手动部署
astrbot 4.23.1

OS

Windows

Logs / 报错日志

[2026-04-17 00:55:18.368] [Core] [WARN] [v4.23.1] [star.star_manager:1812]: 安装插件 plugin_upload_astrbot_plugin_gitee_aiimg 失败,插件安装目录:/root/AstrBot/data/plugins/plugin_upload_9hzpufvs
[2026-04-17 00:55:18.369] [Core] [ERRO] [v4.23.1] [routes.plugin:571]: Traceback (most recent call last):
File "/root/AstrBot/astrbot/dashboard/routes/plugin.py", line 554, in install_plugin_upload
plugin_info = await self.plugin_manager.install_plugin_from_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/AstrBot/astrbot/core/star/star_manager.py", line 1737, in install_plugin_from_file
self.updator.unzip_file(zip_file_path, desti_dir)
File "/root/AstrBot/astrbot/core/star/updator.py", line 63, in unzip_file
files = os.listdir(os.path.join(target_dir, update_dir))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NotADirectoryError: [Errno 20] Not a directory: '/root/AstrBot/data/plugins/plugin_upload_9hzpufvs/main.py'

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendbugSomething isn't workingfeature:pluginThe bug / feature is about AstrBot plugin system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions