Coder Social home page Coder Social logo

nonebot-plugin-covid-19-by's Introduction

Hi My name is bingyue🌙

A developer from China

  • A senior high school student👨‍🎓
  • Learning C++ and conputer algorithm now🖥
  • I'm busy with my studies🏫
  • Welcome to see my blog🔗

My Skills✨

Donate and support❤

Click it 👉Me👈

My Contact

telegram qq X


Top Langs

Bingyue's GitHub stats

nonebot-plugin-covid-19-by's People

Contributors

bingqiu456 avatar seafhmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

cloudawn seafhmc

nonebot-plugin-covid-19-by's Issues

需要字符串作为左操作数,而不是int(TypeError: 'in <string>' requires string as left operand, not int)

我有预感这是一个非常简单的问题不过还是麻烦了。我什么都不会,寄

covid_19_by_group=[群号] #开启插件的群号 注意不要加""符号!!!

covid_19_by_colour=#ff4500 #设置文字转图片的颜色 如:#ffffff

covid_19_by_size=25 #设置文字转图片的大小 如:30

covid_19_by_images=[群号]#开启文字转图片的群 注意不要加""符号!!!

[ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_covid_19_by) failed.
Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\Scripts\nb.exe_main
.py", line 7, in
sys.exit(main())
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nb_cli\handlers\deploy.py", line 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot_init
.py", line 273, in run
get_driver().run(*args, **kwargs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\drivers\fastapi.py", line 172, in run
uvicorn.run(
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\main.py", line 576, in run
server.run()
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 634, in run_until_complete
self.run_forever()
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 601, in run_forever
self._run_once()
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1905, in _run_once
handle._run()
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 186, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\matcher.py", line 716, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\internal\matcher.py", line 688, in simple_run
await handler(
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\dependencies_init
.py", line 108, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot_plugin_covid_19_by_init_.py", line 42, in _
if int(event.group_id) in group_covid:
TypeError: 'in ' requires string as left operand, not int

查询任一地区风险报错

报错如下

08-01 01:11:53 [ERROR] nonebot | Running matcher <Matcher from nonebot_plugin_covid_19_by, type=message, priority=30, temp=False> failed.
Traceback (most recent call last):
File "/usr/local/bin/nb", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/nb_cli/commands/main.py", line 30, in run
run_bot(file, app)
File "/usr/local/lib/python3.8/dist-packages/nb_cli/handlers/deploy.py", line 25, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "/usr/local/lib/python3.8/dist-packages/nonebot/init.py", line 261, in run
get_driver().run(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/nonebot/drivers/fastapi.py", line 170, in run
uvicorn.run(
File "/usr/local/lib/python3.8/dist-packages/uvicorn/main.py", line 463, in run
server.run()
File "/usr/local/lib/python3.8/dist-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.8/dist-packages/nonebot/message.py", line 146, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/usr/local/lib/python3.8/dist-packages/nonebot/message.py", line 196, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.8/dist-packages/nonebot/internal/matcher.py", line 668, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.8/dist-packages/nonebot/internal/matcher.py", line 635, in simple_run
await handler(
File "/usr/local/lib/python3.8/dist-packages/nonebot/dependencies/init.py", line 92, in call
return await self.call(**values)
File "/usr/local/lib/python3.8/dist-packages/nonebot_plugin_covid_19_by/init.py", line 74, in cha
b = await httpx.AsyncClient().get(f"https://interface.sina.cn/news/ncp/data.d.json?mod=risk_level&areaname={a[0]}|{a[1]}|%E5%85%A8%E9%83%A8",headers={"user-agent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36"})
IndexError: list index out of range

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.