fix: don't reconnect when http client is closed #1953
28 tests run, 16 passed, 1 skipped, 11 failed.
Annotations
Check failure on line 166 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_channels
RuntimeError: Timeout context manager should be used inside a task
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest.mark.asyncio
async def test_channels(bot: Client, guild: Guild) -> None:
channels = [
> guild_category := await guild.create_category("_test_category"),
await guild.create_text_channel(f"_test_text-{bot.suffix}"),
await guild.create_news_channel(f"_test_news-{bot.suffix}"),
await guild.create_stage_channel(f"_test_stage-{bot.suffix}"),
await guild.create_voice_channel(f"_test_voice-{bot.suffix}"),
]
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:166:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1260: in create_category
return await self.create_channel(
name = '_test_category'
permission_overwrites = Missing
position = Missing
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_CATEGORY: 4>
kwargs = {}
name = '_test_category'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_CATEGORY: 4>
guild_id = 1338641304187306075
kwargs = {}
name = '_test_category'
nsfw = False
parent_id = None
payload = {'name': '_test_category', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:425: in request
async with self.__session.request(route.method, route.url, **kwargs) as response:
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T..., 'json': {'name': '_test_category', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_CATEGORY: 4>}}
lock = <BucketLock: Generic, limit: 1, remaining: 1, delta: 0.0>
params = None
payload = {'name': '_test_category', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': '_test_category', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_CATEGORY: 4>}
reason = Missing
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:1488: in __aenter__
self._resp: _RetType = await self._coro
self = <aiohttp.client._BaseRequestContextManager object at 0x7f254b0d8e80>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:622: in _request
with timer:
allow_redirects = True
auth = None
auto_decompress = True
chunked = None
compress = None
cookies = None
data = <aiohttp.payload.JsonPayload object at 0x7f254b0dae30>
expect100 = False
fingerprint = None
handle = None
headers = <CIMultiDict('User-Agent': 'DiscordBot (https://github.com/interactions-py/interactions.py 5.15.0 Python/3.10) aiohttp...on': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-Type': 'application/json')>
history = []
json = {'name': '_test_category', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_CATEGORY: 4>}
max_field_size = 8190
max_line_size = 8190
max_redirects = 10
method = 'POST'
middlewares = None
params = {}
proxy = None
proxy_auth = None
proxy_headers = None
raise_for_status = None
read_bufsize = 65536
read_until_eof = True
real_timeout = ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=30, ceil_threshold=5)
redirects = 0
self = <aiohttp.client.ClientSession object at 0x7f254ae69900>
server_hostname = None
skip_auto_headers = None
skip_headers = None
ssl = True
ssl_context = None
str_or_url = 'https://discord.com/api/v10/guilds/1338641304187306075/channels'
timeout = <_SENTINEL.sentinel: 1>
timer = <aiohttp.helpers.TimerContext object at 0x7f254aee97b0>
tm = <aiohttp.helpers.TimeoutHandle object at 0x7f254aef4880>
trace_request_ctx = None
traces = []
url = URL('https://discord.com/api/v10/guilds/1338641304187306075/channels')
verify_ssl = None
version = HttpVersion(major=1, minor=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.helpers.TimerContext object at 0x7f254aee97b0>
def __enter__(self) -> BaseTimerContext:
task = asyncio.current_task(loop=self._loop)
if task is None:
> raise RuntimeError("Timeout context manager should be used inside a task")
E RuntimeError: Timeout context manager should be used inside a task
self = <aiohttp.helpers.TimerContext object at 0x7f254aee97b0>
task = None
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/helpers.py:650: RuntimeError
Check failure on line 112 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_messages
failed on setup with "interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions"
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest_asyncio.fixture(scope="module")
async def channel(bot, guild) -> GuildText:
> channel = await guild.create_text_channel(f"test_scene - {bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1046: in create_text_channel
return await self.create_channel(
category = None
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_TEXT: 0>
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_TEXT: 0>
guild_id = 1338641304187306075
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
parent_id = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:478: in request
await self._raise_exception(response, route, result)
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...'json': {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}
reason = Missing
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
route = <Route POST /guilds/{guild_id}/channels>
result = {'code': 50013, 'message': 'Missing Permissions'}
async def _raise_exception(self, response, route, result) -> None:
self.logger.error(f"{route.method}::{route.url}: {response.status}")
if response.status == 403:
> raise Forbidden(response, response_data=result, route=route)
E interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:494: Forbidden
Check failure on line 288 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_roles
RuntimeError: Timeout context manager should be used inside a task
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest.mark.asyncio
async def test_roles(bot: Client, guild: Guild) -> None:
roles: list[Role] = []
try:
with suppress(interactions.errors.Forbidden):
> roles.append(await guild.create_role("_test_role3"))
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
role = Role(id=1338641304187306075, name='@everyone', position=0, purchasable_or_has_subscribers=False)
roles = []
tests/test_bot.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1573: in create_role
result = await self._client.http.create_guild_role(guild_id=self.id, payload=payload, reason=reason)
color = Missing
colour = Missing
hoist = False
icon = Missing
mentionable = False
name = '_test_role3'
payload = {'name': '_test_role3'}
permissions = Missing
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
interactions/api/http/http_requests/guild.py:418: in create_guild_role
result = await self.request(
guild_id = 1338641304187306075
payload = {'name': '_test_role3'}
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:425: in request
async with self.__session.request(route.method, route.url, **kwargs) as response:
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...ps://github.com/interactions-py/interactions.py 5.15.0 Python/3.10) aiohttp/3.12.15'}, 'json': {'name': '_test_role3'}}
lock = <BucketLock: Generic, limit: 1, remaining: 1, delta: 0.0>
params = None
payload = {'name': '_test_role3'}
processed_data = {'name': '_test_role3'}
reason = Missing
route = <Route POST /guilds/{guild_id}/roles>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:1488: in __aenter__
self._resp: _RetType = await self._coro
self = <aiohttp.client._BaseRequestContextManager object at 0x7f25488cbac0>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:622: in _request
with timer:
allow_redirects = True
auth = None
auto_decompress = True
chunked = None
compress = None
cookies = None
data = <aiohttp.payload.JsonPayload object at 0x7f25488cbb50>
expect100 = False
fingerprint = None
handle = None
headers = <CIMultiDict('User-Agent': 'DiscordBot (https://github.com/interactions-py/interactions.py 5.15.0 Python/3.10) aiohttp...on': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-Type': 'application/json')>
history = []
json = {'name': '_test_role3'}
max_field_size = 8190
max_line_size = 8190
max_redirects = 10
method = 'POST'
middlewares = None
params = {}
proxy = None
proxy_auth = None
proxy_headers = None
raise_for_status = None
read_bufsize = 65536
read_until_eof = True
real_timeout = ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=30, ceil_threshold=5)
redirects = 0
self = <aiohttp.client.ClientSession object at 0x7f254ae69900>
server_hostname = None
skip_auto_headers = None
skip_headers = None
ssl = True
ssl_context = None
str_or_url = 'https://discord.com/api/v10/guilds/1338641304187306075/roles'
timeout = <_SENTINEL.sentinel: 1>
timer = <aiohttp.helpers.TimerContext object at 0x7f25487f5030>
tm = <aiohttp.helpers.TimeoutHandle object at 0x7f2548df7040>
trace_request_ctx = None
traces = []
url = URL('https://discord.com/api/v10/guilds/1338641304187306075/roles')
verify_ssl = None
version = HttpVersion(major=1, minor=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.helpers.TimerContext object at 0x7f25487f5030>
def __enter__(self) -> BaseTimerContext:
task = asyncio.current_task(loop=self._loop)
if task is None:
> raise RuntimeError("Timeout context manager should be used inside a task")
E RuntimeError: Timeout context manager should be used inside a task
self = <aiohttp.helpers.TimerContext object at 0x7f25487f5030>
task = None
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/helpers.py:650: RuntimeError
Check failure on line 112 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_members
failed on setup with "interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions"
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest_asyncio.fixture(scope="module")
async def channel(bot, guild) -> GuildText:
> channel = await guild.create_text_channel(f"test_scene - {bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1046: in create_text_channel
return await self.create_channel(
category = None
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_TEXT: 0>
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_TEXT: 0>
guild_id = 1338641304187306075
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
parent_id = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:478: in request
await self._raise_exception(response, route, result)
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...'json': {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}
reason = Missing
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
route = <Route POST /guilds/{guild_id}/channels>
result = {'code': 50013, 'message': 'Missing Permissions'}
async def _raise_exception(self, response, route, result) -> None:
self.logger.error(f"{route.method}::{route.url}: {response.status}")
if response.status == 403:
> raise Forbidden(response, response_data=result, route=route)
E interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:494: Forbidden
Check failure on line 112 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_ratelimit
failed on setup with "interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions"
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest_asyncio.fixture(scope="module")
async def channel(bot, guild) -> GuildText:
> channel = await guild.create_text_channel(f"test_scene - {bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1046: in create_text_channel
return await self.create_channel(
category = None
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_TEXT: 0>
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_TEXT: 0>
guild_id = 1338641304187306075
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
parent_id = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:478: in request
await self._raise_exception(response, route, result)
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...'json': {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}
reason = Missing
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
route = <Route POST /guilds/{guild_id}/channels>
result = {'code': 50013, 'message': 'Missing Permissions'}
async def _raise_exception(self, response, route, result) -> None:
self.logger.error(f"{route.method}::{route.url}: {response.status}")
if response.status == 403:
> raise Forbidden(response, response_data=result, route=route)
E interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:494: Forbidden
Check failure on line 112 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_embeds
failed on setup with "interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions"
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest_asyncio.fixture(scope="module")
async def channel(bot, guild) -> GuildText:
> channel = await guild.create_text_channel(f"test_scene - {bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1046: in create_text_channel
return await self.create_channel(
category = None
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_TEXT: 0>
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_TEXT: 0>
guild_id = 1338641304187306075
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
parent_id = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:478: in request
await self._raise_exception(response, route, result)
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...'json': {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}
reason = Missing
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
route = <Route POST /guilds/{guild_id}/channels>
result = {'code': 50013, 'message': 'Missing Permissions'}
async def _raise_exception(self, response, route, result) -> None:
self.logger.error(f"{route.method}::{route.url}: {response.status}")
if response.status == 403:
> raise Forbidden(response, response_data=result, route=route)
E interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:494: Forbidden
Check failure on line 112 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_components
failed on setup with "interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions"
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest_asyncio.fixture(scope="module")
async def channel(bot, guild) -> GuildText:
> channel = await guild.create_text_channel(f"test_scene - {bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1046: in create_text_channel
return await self.create_channel(
category = None
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_TEXT: 0>
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_TEXT: 0>
guild_id = 1338641304187306075
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
parent_id = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:478: in request
await self._raise_exception(response, route, result)
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...'json': {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}
reason = Missing
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
route = <Route POST /guilds/{guild_id}/channels>
result = {'code': 50013, 'message': 'Missing Permissions'}
async def _raise_exception(self, response, route, result) -> None:
self.logger.error(f"{route.method}::{route.url}: {response.status}")
if response.status == 403:
> raise Forbidden(response, response_data=result, route=route)
E interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:494: Forbidden
Check failure on line 112 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_polls
failed on setup with "interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions"
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest_asyncio.fixture(scope="module")
async def channel(bot, guild) -> GuildText:
> channel = await guild.create_text_channel(f"test_scene - {bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1046: in create_text_channel
return await self.create_channel(
category = None
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_TEXT: 0>
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_TEXT: 0>
guild_id = 1338641304187306075
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
parent_id = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:478: in request
await self._raise_exception(response, route, result)
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...'json': {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}
reason = Missing
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
route = <Route POST /guilds/{guild_id}/channels>
result = {'code': 50013, 'message': 'Missing Permissions'}
async def _raise_exception(self, response, route, result) -> None:
self.logger.error(f"{route.method}::{route.url}: {response.status}")
if response.status == 403:
> raise Forbidden(response, response_data=result, route=route)
E interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:494: Forbidden
Check failure on line 112 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_webhooks
failed on setup with "interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions"
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest_asyncio.fixture(scope="module")
async def channel(bot, guild) -> GuildText:
> channel = await guild.create_text_channel(f"test_scene - {bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1046: in create_text_channel
return await self.create_channel(
category = None
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_TEXT: 0>
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_TEXT: 0>
guild_id = 1338641304187306075
kwargs = {}
name = 'test_scene - 55d3c59'
nsfw = False
parent_id = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:478: in request
await self._raise_exception(response, route, result)
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...'json': {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'position': Missing, 'rate_limit_per_user': 0, ...}
processed_data = {'name': 'test_scene - 55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, 'type': <ChannelType.GUILD_TEXT: 0>}
reason = Missing
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
route = <Route POST /guilds/{guild_id}/channels>
result = {'code': 50013, 'message': 'Missing Permissions'}
async def _raise_exception(self, response, route, result) -> None:
self.logger.error(f"{route.method}::{route.url}: {response.status}")
if response.status == 403:
> raise Forbidden(response, response_data=result, route=route)
E interactions.client.errors.Forbidden: HTTPException: 403|Forbidden || Missing Permissions
response = <ClientResponse(https://discord.com/api/v10/guilds/1338641304187306075/channels) [403 Forbidden]>
<CIMultiDictProxy('D...870&sentry_environment=stable", 'Server': 'cloudflare', 'CF-RAY': '96e551dddda7ebe3-SJC', 'Content-Encoding': 'gzip')>
result = {'code': 50013, 'message': 'Missing Permissions'}
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:494: Forbidden
Check failure on line 583 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_voice
RuntimeError: Timeout context manager should be used inside a task
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest.mark.asyncio
async def test_voice(bot: Client, guild: Guild) -> None:
> test_channel = await guild.create_voice_channel(f"_test_voice-{bot.suffix}")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:583:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:1183: in create_voice_channel
return await self.create_channel(
bitrate = 64000
category = None
name = '_test_voice-55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/models/discord/guild.py:999: in create_channel
channel_data = await self._client.http.create_guild_channel(
bitrate = 64000
category = None
channel_type = <ChannelType.GUILD_VOICE: 2>
kwargs = {}
name = '_test_voice-55d3c59'
nsfw = False
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
topic = Missing
user_limit = 0
interactions/api/http/http_requests/channels.py:169: in create_guild_channel
result = await self.request(
bitrate = 64000
channel_type = <ChannelType.GUILD_VOICE: 2>
guild_id = 1338641304187306075
kwargs = {}
name = '_test_voice-55d3c59'
nsfw = False
parent_id = None
payload = {'bitrate': 64000, 'name': '_test_voice-55d3c59', 'nsfw': False, 'position': Missing, ...}
permission_overwrites = Missing
position = Missing
rate_limit_per_user = 0
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
topic = Missing
user_limit = 0
interactions/api/http/http_client.py:425: in request
async with self.__session.request(route.method, route.url, **kwargs) as response:
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...ttp/3.12.15'}, 'json': {'bitrate': 64000, 'name': '_test_voice-55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, ...}}
lock = <BucketLock: be56019ae011689ff5baf218062aacf5, limit: 2000, remaining: 1998, delta: 82761.45>
params = None
payload = {'bitrate': 64000, 'name': '_test_voice-55d3c59', 'nsfw': False, 'position': Missing, ...}
processed_data = {'bitrate': 64000, 'name': '_test_voice-55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, ...}
reason = Missing
route = <Route POST /guilds/{guild_id}/channels>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:1488: in __aenter__
self._resp: _RetType = await self._coro
self = <aiohttp.client._BaseRequestContextManager object at 0x7f254b0bdf60>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:622: in _request
with timer:
allow_redirects = True
auth = None
auto_decompress = True
chunked = None
compress = None
cookies = None
data = <aiohttp.payload.JsonPayload object at 0x7f254b0bc0a0>
expect100 = False
fingerprint = None
handle = None
headers = <CIMultiDict('User-Agent': 'DiscordBot (https://github.com/interactions-py/interactions.py 5.15.0 Python/3.10) aiohttp...on': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-Type': 'application/json')>
history = []
json = {'bitrate': 64000, 'name': '_test_voice-55d3c59', 'nsfw': False, 'rate_limit_per_user': 0, ...}
max_field_size = 8190
max_line_size = 8190
max_redirects = 10
method = 'POST'
middlewares = None
params = {}
proxy = None
proxy_auth = None
proxy_headers = None
raise_for_status = None
read_bufsize = 65536
read_until_eof = True
real_timeout = ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=30, ceil_threshold=5)
redirects = 0
self = <aiohttp.client.ClientSession object at 0x7f254ae69900>
server_hostname = None
skip_auto_headers = None
skip_headers = None
ssl = True
ssl_context = None
str_or_url = 'https://discord.com/api/v10/guilds/1338641304187306075/channels'
timeout = <_SENTINEL.sentinel: 1>
timer = <aiohttp.helpers.TimerContext object at 0x7f2548d12d40>
tm = <aiohttp.helpers.TimeoutHandle object at 0x7f2548c348c0>
trace_request_ctx = None
traces = []
url = URL('https://discord.com/api/v10/guilds/1338641304187306075/channels')
verify_ssl = None
version = HttpVersion(major=1, minor=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.helpers.TimerContext object at 0x7f2548d12d40>
def __enter__(self) -> BaseTimerContext:
task = asyncio.current_task(loop=self._loop)
if task is None:
> raise RuntimeError("Timeout context manager should be used inside a task")
E RuntimeError: Timeout context manager should be used inside a task
self = <aiohttp.helpers.TimerContext object at 0x7f2548d12d40>
task = None
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/helpers.py:650: RuntimeError
Check failure on line 636 in tests/test_bot.py
github-actions / Pytest Results
test_bot.test_emoji
RuntimeError: Timeout context manager should be used inside a task
Raw output
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
@pytest.mark.asyncio
async def test_emoji(bot: Client, guild: Guild) -> None:
emoji = None
try:
> emoji = await guild.create_custom_emoji("testEmoji", r"tests/LordOfPolls.png")
bot = <interactions.client.client.Client object at 0x7f254ce94cd0>
emoji = None
guild = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
tests/test_bot.py:636:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interactions/models/discord/guild.py:887: in create_custom_emoji
emoji_data = await self._client.http.create_guild_emoji(data_payload, self.id, reason=reason)
data_payload = {'image': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnkAAAJ5CAYAAADSCSahAAAgAElEQVR4Xuy9CXhX1bX3/808z8kvCZPIrKgIK...QKK2Dn4Ha7Vpjh/8SM/Yg7O9/V77/7X9uVp5LuSqLtyhx33V9AkjuGX2ihsgAAAABJRU5ErkJggg==', 'name': 'testEmoji', 'roles': Missing}
imagefile = 'tests/LordOfPolls.png'
name = 'testEmoji'
reason = Missing
roles = Missing
self = Guild(id=1338641304187306075, name='Interactions.py Test Suite', description=None)
interactions/api/http/http_requests/emojis.py:64: in create_guild_emoji
result = await self.request(
guild_id = 1338641304187306075
payload = {'image': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnkAAAJ5CAYAAADSCSahAAAgAElEQVR4Xuy9CXhX1bX3/808z8kvCZPIrKgIK...QKK2Dn4Ha7Vpjh/8SM/Yg7O9/V77/7X9uVp5LuSqLtyhx33V9AkjuGX2ihsgAAAABJRU5ErkJggg==', 'name': 'testEmoji', 'roles': Missing}
reason = Missing
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
interactions/api/http/http_client.py:425: in request
async with self.__session.request(route.method, route.url, **kwargs) as response:
attempt = 0
files = None
kwargs = {'headers': {'Authorization': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-T...10keYdz4yoEEEAAAQQKK2Dn4Ha7Vpjh/8SM/Yg7O9/V77/7X9uVp5LuSqLtyhx33V9AkjuGX2ihsgAAAABJRU5ErkJggg==', 'name': 'testEmoji'}}
lock = <BucketLock: Generic, limit: 1, remaining: 1, delta: 0.0>
params = None
payload = {'image': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnkAAAJ5CAYAAADSCSahAAAgAElEQVR4Xuy9CXhX1bX3/808z8kvCZPIrKgIK...QKK2Dn4Ha7Vpjh/8SM/Yg7O9/V77/7X9uVp5LuSqLtyhx33V9AkjuGX2ihsgAAAABJRU5ErkJggg==', 'name': 'testEmoji', 'roles': Missing}
processed_data = {'image': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnkAAAJ5CAYAAADSCSahAAAgAElEQVR4Xuy9CXhX1bX3/808z8kvCZPIrKgIK...t10keYdz4yoEEEAAAQQKK2Dn4Ha7Vpjh/8SM/Yg7O9/V77/7X9uVp5LuSqLtyhx33V9AkjuGX2ihsgAAAABJRU5ErkJggg==', 'name': 'testEmoji'}
reason = Missing
route = <Route POST /guilds/{guild_id}/emojis>
self = <interactions.api.http.http_client.HTTPClient object at 0x7f254ca422f0>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:1488: in __aenter__
self._resp: _RetType = await self._coro
self = <aiohttp.client._BaseRequestContextManager object at 0x7f2548b4a530>
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/client.py:622: in _request
with timer:
allow_redirects = True
auth = None
auto_decompress = True
chunked = None
compress = None
cookies = None
data = <aiohttp.payload.JsonPayload object at 0x7f2548b4a8f0>
expect100 = False
fingerprint = None
handle = None
headers = <CIMultiDict('User-Agent': 'DiscordBot (https://github.com/interactions-py/interactions.py 5.15.0 Python/3.10) aiohttp...on': 'Bot OTcwMDE4NTIxNTExNzY4MDk0.GiUpzu.UvuGwp3rf8iEKe7iRIl-4mKqbF2Qeuz6KTGp8w', 'Content-Type': 'application/json')>
history = []
json = {'image': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnkAAAJ5CAYAAADSCSahAAAgAElEQVR4Xuy9CXhX1bX3/808z8kvCZPIrKgIK...t10keYdz4yoEEEAAAQQKK2Dn4Ha7Vpjh/8SM/Yg7O9/V77/7X9uVp5LuSqLtyhx33V9AkjuGX2ihsgAAAABJRU5ErkJggg==', 'name': 'testEmoji'}
max_field_size = 8190
max_line_size = 8190
max_redirects = 10
method = 'POST'
middlewares = None
params = {}
proxy = None
proxy_auth = None
proxy_headers = None
raise_for_status = None
read_bufsize = 65536
read_until_eof = True
real_timeout = ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=30, ceil_threshold=5)
redirects = 0
self = <aiohttp.client.ClientSession object at 0x7f254ae69900>
server_hostname = None
skip_auto_headers = None
skip_headers = None
ssl = True
ssl_context = None
str_or_url = 'https://discord.com/api/v10/guilds/1338641304187306075/emojis'
timeout = <_SENTINEL.sentinel: 1>
timer = <aiohttp.helpers.TimerContext object at 0x7f2548c2ad40>
tm = <aiohttp.helpers.TimeoutHandle object at 0x7f2548cae300>
trace_request_ctx = None
traces = []
url = URL('https://discord.com/api/v10/guilds/1338641304187306075/emojis')
verify_ssl = None
version = HttpVersion(major=1, minor=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.helpers.TimerContext object at 0x7f2548c2ad40>
def __enter__(self) -> BaseTimerContext:
task = asyncio.current_task(loop=self._loop)
if task is None:
> raise RuntimeError("Timeout context manager should be used inside a task")
E RuntimeError: Timeout context manager should be used inside a task
self = <aiohttp.helpers.TimerContext object at 0x7f2548c2ad40>
task = None
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/aiohttp/helpers.py:650: RuntimeError