pycord: Error, async_.py

Summary

It tries to import https://github.com/Pycord-Development/pycord/blob/6d30c5b7764ff87f3102ddef32c656f463b26132/discord/channel.py#L2033 in file https://github.com/Pycord-Development/pycord/blob/master/discord/webhook/async_.py#L46

Reproduction Steps

I ran my bot,

python3.9 MinecraftBot.py

Minimal Reproducible Code

import json, requests, discord, asyncio, time, itertools, os, topgg

Expected Results

Everything to run smoothly and the Slash commands to be working.

Actual Results

Traceback (most recent call last):
  File "/home/quartz_i_warrior/MinecraftBot.py", line 1, in <module>
    import json, requests, discord, asyncio, time, itertools, os, topgg
  File "/home/quartz_i_warrior/.local/lib/python3.9/site-packages/discord/__init__.py", line 25, in <module>
    from .client import Client
  File "/home/quartz_i_warrior/.local/lib/python3.9/site-packages/discord/client.py", line 53, in <module>
    from .webhook import Webhook
  File "/home/quartz_i_warrior/.local/lib/python3.9/site-packages/discord/webhook/__init__.py", line 12, in <module>
    from .async_ import *
  File "/home/quartz_i_warrior/.local/lib/python3.9/site-packages/discord/webhook/async_.py", line 46, in <module>
    from ..channel import PartialMessageable
ImportError: cannot import name 'PartialMessageable' from 'discord.channel' (/home/quartz_i_warrior/.local/lib/python3.9/site-packages/discord/channel.py)

Intents

None.

System Information

  • Python v3.9.7-final
  • discord.py v1.7.3-final
  • aiohttp v3.7.4.post0
  • system info: Linux 4.19.0-17-cloud-amd64 #1 SMP Debian 4.19.194-2 (2021-06-21)

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

The error starts here when importing from here.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 30 (10 by maintainers)

Most upvoted comments

Also, is there a different method for importing from discord.ext import commands, tasks now?

Because the error starts with

Traceback (most recent call last):
  File "/home/quartz_i_warrior/MinecraftBot.py", line 3, in <module>
    from discord.ext import commands, tasks