8000 Unable to import the module [vs code and the package itself] · Issue #112 · discord-py-ui/discord-ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Unable to import the module [vs code and the package itself] #112

Closed
EpicBirb opened this issue Dec 9, 2021 · 11 comments
Closed

Unable to import the module [vs code and the package itself] #112

EpicBirb opened this issue Dec 9, 2021 · 11 comments

Comments

@EpicBirb
Copy link
EpicBirb commented Dec 9, 2021

VS code:
image

Python interpreter:
image

@EpicBirb
Copy link
Author
EpicBirb commented Dec 9, 2021

also.
without using import discord_ui
it will have the NoModuleFoundError because of line 29

@RedstoneZockt
Copy link
Collaborator

Can u try to remove the .client after discord_ui?
so: from discord_ui import UI

@kvsxxx
Copy link
Member
kvsxxx commented Dec 10, 2021

seems like imports in nextcord are a bit different, I'll fix that, sorry for the trouble

@kvsxxx
Copy link
Member
kvsxxx commented Dec 10, 2021

alrighty, that issue should be fixed in v5.1.2, thanks for reporting and sorry for the wait.

I'll leave this issue open in case the issue should still exsist or you still got any problems, if it's fixed for you, just close the issue :)

@EpicBirb
Copy link
Author

image

Can u try to remove the .client after discord_ui? so: from discord_ui import UI

@EpicBirb
Copy link
Author

Failed to import discord_ui on 5.1.2

image

@EpicBirb
Copy link
Author

More context for above screenshot:
image

@kvsxxx
Copy link
Member
kvsxxx commented Dec 10, 2021

can you import discord? A discord package sould be installed together with nextcord for migration support ('alias'). It seems that the discord package is not existing ('discord' (unknown location))

can you try a simple import and tell me the output?

import discord
from discord import __version__

@EpicBirb
Copy link
Author

can you import discord? A discord package sould be installed together with nextcord for migration support ('alias'). It seems that the discord package is not existing ('discord' (unknown location))

can you try a simple import and tell me the output?

import discord
from discord import __version__

image

@kvsxxx
Copy link
Member
kvsxxx commented Dec 11, 2021

huh that's weird. Can you try to reinstall nextcord? I tried reproducing that and in my case both imports didn't raise any exceptions.

py -3.10 -m pip uninstall nextcord && py -3.10 -m pip install nextcord

My ouput was:

Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import discord
>>> from discord import __version__
>>>

Btw thank you very much for your patience!

@EpicBirb
Copy link
Author

It works perfectly now, thank you :D

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

No branches or pull requests

3 participants
0