Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ошибка клан /clan #8

Open
defensderts opened this issue Jun 19, 2024 · 3 comments
Open

ошибка клан /clan #8

defensderts opened this issue Jun 19, 2024 · 3 comments

Comments

@defensderts
Copy link

Loop успешно были подключены
Ignoring exception in command <nextcord.application_command.SlashApplicationCommand object at 0x000001DF4F351CD0>:
Traceback (most recent call last):
File "D:\Users\Админ\Desktop\Economy-bot-discord-v2-main\cogs\clan.py", line 787, in clan
a = await clan_owner(back, str(owner.display_avatar.url), dopclan[3], dopclan[4], dopclan[11], voicetime, dopclan[12], dopclan[6], dopclan[13], dopclan[14])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Users\Админ\Desktop\Economy-bot-discord-v2-main\clan.py", line 38, in clan_owner
awa_clan = Image.open(io.BytesIO(awa_clan)).resize((310,310))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Админ\python\Lib\site-packages\PIL\Image.py", line 3298, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x000001DF575B6700>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Админ\python\Lib\site-packages\nextcord\application_command.py", line 918, in invoke_callback_with_hooks
await self(interaction, *args, **kwargs)
File "D:\Users\Админ\Desktop\Economy-bot-discord-v2-main\cogs\clan.py", line 800, in clan
except Error as e:
^^^^^
NameError: name 'Error' is not defined

The above exception was the direct cause of the following exception:

nextcord.errors.ApplicationInvokeError: Command raised an exception: NameError: name 'Error' is not defined

в чем проблема?

@rebraQQ
Copy link

rebraQQ commented Jun 26, 2024

получилось фиксануть код?

@defensderts
Copy link
Author

@reques6e
Copy link

reques6e commented Jul 22, 2024

Вместо:

except Error as e:
    # обработка исключения
    print(f"Произошла ошибка: {e}")
except:
    print(f"Произошла ошибка")

Самый простой фикс

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants