amiyabot / amiya-bot-core Goto Github PK
View Code? Open in Web Editor NEW异步 Python 机器人框架
Home Page: https://www.amiyabot.com/
License: MIT License
异步 Python 机器人框架
Home Page: https://www.amiyabot.com/
License: MIT License
我在开发的时候,遇到这样一种需求
我做了一个功能,可以记录群内所有人说的话并生成词云,为了让他能够响应任意话语,最初他的开头是这样的:
async def any_talk(data: Message):
return True
@bot.on_message(verify=any_talk, check_prefix=False)
async def _(data: Message):
....
这就产生了一个问题,他短路了所有的Message,任何其他事件,包括来自其他插件的事件,只要没有level>1,都无法执行了。
我在想,是否需要提供一个功能,让某个message事件函数不会短路其他的事件,这个函数执行完以后,会继续执行其他的注册函数。
我自己尝试了两个版本,一个是设置为level可以为负数,但是这样就影响了Verify的len重载(很奇怪不知道为什么要重载这个函数),我担心有side effect。
另一个是给on_message提供一个bypass布尔值参数,但是严重影响handler的逻辑,并且和level的语义冲突。
不管哪个,都不是很好,所以都没有提交PR。
所以我这里提一个小小的功能建议,希望大佬们考虑一下。
想接入微信群使用
暂未找到方法复现,表现在 AmiyaBot 的生产环境上。
在使用 onebot v11 适配器,兔兔主动向私聊和群内发送消息时,出现发送失败的情况,影响范围有:微博推送、定时提醒等自动发送消息的插件
user_id
参数,但获得了空值,导致 onebot 处理要发送的消息时出错send_message
Chain
→ 构建消息 → 调用适配器实例的方法 send_message
发送消息user_id
的值,创建的消息链 Chain
中默认为空字符串,定位到 onebot v11 适配器的 send_message
方法中也没有处理空值参数,最终导致发送主动消息时失败因为影响到多个插件发送主动消息的方法,从插件方面适配解决问题不符合实际,因此选择对默认的 onebot v11 适配器方法进行空值处理,来解决问题(参考 onebot v11 api - send_msg)
通过把返回中的空值项移除,从而解决空值项导致发送消息失败的问题,又不影响有值存在时的情况
对空值移除处理后的返回值测试:
user_id
存在值的情况user_id
存在空值的情况user_id
不存在值的情况rt
我在k8s集群里跑amiyabot的时候,发现一个小问题,系统内存里驻留了大量的Chrome进程,观察运行情况,猜测是内存用尽,最后失去响应。
我检查了一下代码,怀疑是在playwright遇到错误的时候,你们忘记close page导致这个chrome就永远驻留内存了
因为各种机缘巧合,playwright出错就会导致一个驻留,日积月累就会渐渐占满内存
具体来说,在browserService.py的open_page函数里,如果执行page的函数抛出异常,就会导致这个page对象丢失,再也不会回收,这里建议是加一块finally来尝试执行page.close
这个问题比较难以复现,因为你需要通过机缘巧合让playwright出错,最简单的办法就是发起一个cpu load,这样chrome就会因为没有cpu资源而超时,进而抛出错误。
6.0.0
No response
2022-10-21 07:46:37,955 [ Bot][ ERROR] Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/aiohttp/formdata.py", line 136, in _gen_form_data
part = payload.get_payload(
File "/usr/local/lib/python3.8/dist-packages/aiohttp/payload.py", line 73, in get_payload
return PAYLOAD_REGISTRY.get(data, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/aiohttp/payload.py", line 112, in get
raise LookupError()
aiohttp.payload.LookupError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/amiyabot/network/httpRequests.py", line 26, in __handle_requests
yield session, handler
File "/usr/local/lib/python3.8/dist-packages/amiyabot/network/httpRequests.py", line 62, in upload
async with session.post(interface, data=data) as res:
File "/usr/local/lib/python3.8/dist-packages/aiohttp/client.py", line 1117, in __aenter__
self._resp = await self._coro
File "/usr/local/lib/python3.8/dist-packages/aiohttp/client.py", line 492, in _request
req = self._request_class(
File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_reqrep.py", line 313, in __init__
self.update_body_from_data(data)
File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_reqrep.py", line 507, in update_body_from_data
body = body()
File "/usr/local/lib/python3.8/dist-packages/aiohttp/formdata.py", line 168, in __call__
return self._gen_form_data()
File "/usr/local/lib/python3.8/dist-packages/aiohttp/formdata.py", line 147, in _gen_form_data
raise TypeError(
TypeError: Can not serialize value type: <class 'NoneType'>
headers: {'Content-Type': 'application/octet-stream'}
value: None
2022-10-21 07:46:37,959 [ Bot][ ERROR] handler error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/amiyabot/log/manager.py", line 100, in catch
yield
File "/usr/local/lib/python3.8/dist-packages/amiyabot/__init__.py", line 46, in __message_handler
await message_handler(self, event, message)
File "/usr/local/lib/python3.8/dist-packages/amiyabot/handler/messageHandler.py", line 61, in message_handler
reply = await handler.action(data)
File "/usr/local/lib/python3.8/dist-packages/amiyabot/handler/messageHandlerDefine.py", line 134, in action
return await self.function(data)
File "/amiyabot/functions/about.py", line 20, in _
reply = await data.wait(Chain(data).markdown(content))
File "/usr/local/lib/python3.8/dist-packages/amiyabot/builtin/message.py", line 88, in wait
await self.instance.send_chain_message(reply)
File "/usr/local/lib/python3.8/dist-packages/amiyabot/adapters/mirai/__init__.py", line 98, in send_chain_message
reply, voice_list = await build_message_send(self.api, chain)
File "/usr/local/lib/python3.8/dist-packages/amiyabot/adapters/mirai/builder.py", line 55, in build_message_send
'imageId': await get_image_id(api, await item.create_html_image(), chain.data.message_type)
File "/usr/local/lib/python3.8/dist-packages/amiyabot/adapters/mirai/builder.py", line 66, in get_image_id
return await http.upload_image(target, msg_type)
File "/usr/local/lib/python3.8/dist-packages/amiyabot/adapters/mirai/api.py", line 48, in upload_image
if 'imageId' in res:
TypeError: argument of type 'NoneType' is not iterable
2022-10-21 07:50:17,071 [ Bot][ ERROR] html convert error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/amiyabot/log/manager.py", line 100, in catch
yield
File "/usr/local/lib/python3.8/dist-packages/amiyabot/builtin/messageChain/element.py", line 58, in create_html_image
page = await basic_browser_service.open_page(self.template,
File "/usr/local/lib/python3.8/dist-packages/amiyabot/builtin/lib/browserService.py", line 51, in open_page
await page.goto(url)
File "/usr/local/lib/python3.8/dist-packages/playwright/async_api/_generated.py", line 7601, in goto
await self._async(
File "/usr/local/lib/python3.8/dist-packages/playwright/_impl/_page.py", line 493, in goto
return await self._main_frame.goto(**locals_to_params(locals()))
File "/usr/local/lib/python3.8/dist-packages/playwright/_impl/_frame.py", line 122, in goto
await self._channel.send("goto", locals_to_params(locals()))
File "/usr/local/lib/python3.8/dist-packages/playwright/_impl/_connection.py", line 39, in send
return await self.inner_send(method, params, False)
File "/usr/local/lib/python3.8/dist-packages/playwright/_impl/_connection.py", line 63, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
navigating to "file:////amiyabot/plugins/amiyabot-arknights-operator-1_4/template/operatorInfo.html", waiting until "load"
日志不好找了,这是当时timeout的错误,验证了我的猜测
在新服务器上部署amiyabot,提示如下:
Traceback (most recent call last): File "amiya.py", line 4, in <module> import core.frozen File "/usr/amiya/Amiya-Bot/core/__init__.py", line 164, in <module> async def _(err: Exception, instance: BotAdapterProtocol, data: Union[Message, Event]): File "/usr/local/lib/python3.8/dist-packages/amiyabot/factory/__init__.py", line 138, in handler for item in exceptions: TypeError: 'type' object is not iterable
python module amiyabot版本为1.3.10
admin@:/usr/amiya/Amiya-Bot$ pip3 list
Package Version
aiohttp 3.7.4.post0
amiyabot 1.3.10
查询/usr/local/lib/python3.8/dist-packages/amiyabot/factory/init.py,发现def on_exception方法可能有问题:
‘
def handler(func: ExceptionHandlerType):
nonlocal exceptions
**if isinstance(exceptions, list):
exceptions = [exceptions]**
exception_handlers = self.get_container('exception_handlers')
for item in exceptions:
if item not in exception_handlers:
exception_handlers[item] = []
exception_handlers[item].append(func)
return func’
if isinstance(exceptions, list): exceptions = [exceptions]
这一段有问题吧?
python 模块 amiyabot=1.3.10
6.0.15-rc3
No response
No response
No response
import asyncio
from amiyabot import Chain, AmiyaBot, Message
bot = AmiyaBot(appid='x', token='x', private=True)
@bot.on_message(keywords='hello')
async def _(data: Message):
return Chain(data).text(f'hello, {data.nickname}')
asyncio.run(bot.start())
包括但不限于:
目前可定向关闭的定时任务只能由全局管理器创建,Bot实例创建的任务难以定向关闭。需要提供新参数实现。
在Go-Cqhtp接入情况下,私聊信息被敌人资料插件接管,发送任意内容会回复“博士,请说明需要查询的敌方单位名称”
私聊发送“ewq”
机器人返回“博士,请说明需要查询的敌方单位名称”
私聊发送“大鲍勃”
机器人返回大鲍勃的资料图片
不确定,已git clone,重启后应该是自动升级为目前最新版。
明日方舟敌方单位查询 v1.1
时间太久被刷掉了,无法复现。
目前由于未知原因,我不能安装或更新插件,点击安装按钮后弹出气泡“操作未成功 插件下载失败”
No response
在 ubuntu 20.04 下运行会随着时间推移内存逐渐增大最终 oom……
go-cqhttp, my hero! Mrs4s/go-cqhttp#2471
我使用README提供的代码运行我自己的频道机器人,在向机器人发出指令后logging模块报错
UnicodeEncodeError: 'gbk' codec can't encode character '\u05e9' in position 87: illegal multibyte sequence
,并且amiyabot.log文件中中文乱码,我自己在log.py
的file_handler = TimedRotatingFileHandler
中添加了encoding='utf-8'
暂时解决了这一问题,还请官方能修复一下
python3.11.1
Building wheels for collected packages: pillow
Building wheel for pillow (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pillow (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [201 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\PIL
copying src\PIL\BdfFontFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\BlpImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\BmpImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\BufrStubImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ContainerIO.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\CurImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\DcxImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\DdsImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\EpsImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ExifTags.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\features.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\FitsImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\FitsStubImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\FliImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\FontFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\FpxImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\FtexImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\GbrImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\GdImageFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\GifImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\GimpGradientFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\GimpPaletteFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\GribStubImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\Hdf5StubImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\IcnsImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\IcoImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\Image.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageChops.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageCms.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageColor.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageDraw.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageDraw2.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageEnhance.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageFilter.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageFont.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageGrab.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageMath.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageMode.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageMorph.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageOps.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImagePalette.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImagePath.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageQt.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageSequence.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageShow.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageStat.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageTk.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageTransform.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImageWin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\ImtImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\IptcImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\Jpeg2KImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\JpegImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\JpegPresets.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\McIdasImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\MicImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\MpegImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\MpoImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\MspImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PaletteFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PalmImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PcdImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PcfFontFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PcxImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PdfImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PdfParser.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PixarImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PngImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PpmImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PsdImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PSDraw.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\PyAccess.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\SgiImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\SpiderImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\SunImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\TarIO.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\TgaImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\TiffImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\TiffTags.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\WalImageFile.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\WebPImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\WmfImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\XbmImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\XpmImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL\XVThumbImagePlugin.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL_binary.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL_tkinter_finder.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL_util.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL_version.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL_init_.py -> build\lib.win-amd64-cpython-311\PIL
copying src\PIL_main_.py -> build\lib.win-amd64-cpython-311\PIL
running egg_info
writing src\Pillow.egg-info\PKG-INFO
writing dependency_links to src\Pillow.egg-info\dependency_links.txt
writing requirements to src\Pillow.egg-info\requires.txt
writing top-level names to src\Pillow.egg-info\top_level.txt
reading manifest file 'src\Pillow.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.c'
warning: no files found matching '.h'
warning: no files found matching '.sh'
warning: no files found matching '.txt'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.clang-format'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
no previously-included directories found matching '.ci'
adding license file 'LICENSE'
writing manifest file 'src\Pillow.egg-info\SOURCES.txt'
running build_ext
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "<string>", line 989, in <module>
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\dist.py", line 1233, in run_command
super().run_command(command)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 364, in run
self.run_command("build")
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\dist.py", line 1233, in run_command
super().run_command(command)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\dist.py", line 1233, in run_command
super().run_command(command)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 88, in run
_build_ext.run(self)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "<string>", line 804, in build_extensions
RequiredDependencyException: zlib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\build_meta.py", line 434, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\build_meta.py", line 419, in _build_with_temp_dir
self.run_setup()
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-znftywt1\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 1009, in <module>
RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
<string>:45: RuntimeWarning: Pillow 9.1.1 does not support Python 3.11 and does not provide prebuilt Windows binaries. We do not recommend building from source on Windows.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pillow
Failed to build pillow
ERROR: Could not build wheels for pillow, which is required to install pyproject.toml-based projects
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.