Inspect Code failing to resolve absolute references within a package
I'm inspecting one of my packages, and it's failing to resolve internal references.
For a set of files:
package/__init__.py
package/mod1.py
package/subpackage/__init__.py
package/subpackage/mod2.py
In mod1.py, I am attempting to import stuff from mod2.
from package.subpackage.mod2 import someclass
Inspections insist that “package” is an unresolved reference. Am I configuring something wrong?
请先登录再写评论。
You can use uploading service at https://uploads.jetbrains.com/ , and provide upload ID in your reply.
I think I've corrected this.
What I did was:
I'll ping again if this issue resurfaces.
It looks like the Python package manager is broken. When viewing installed packages on the package manager, it will list packages, and can identify that packages have a higher version, but there is no menu to allow upgrade or uninstall. It's possible that this is due to referencing a local PyPi installation, but I would like instructions for figuring out where it's locking up.
PyCharm 2023.3.4 (Professional Edition)
Build #PY-233.14475.56, built on February 25, 2024
Runtime version: 17.0.10+1-b1087.17 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.6.4
GC: G1 Young Generation, G1 Old Generation
Metal Rendering is ON
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true
Non-Bundled Plugins:
com.intellij.ideolog (222.3.2.0)
org.jetbrains.plugins.hocon (2023.1.0)
org.sylfra.idea.plugins.linessorter (1.0.1)
net.seesharpsoft.intellij.plugins.csv (3.3.0-233)
org.exbin.deltahex.intellij (0.2.9)
It should show a “link” to upgrade the package when clicked.
Is it working for you?
No, it isn't. The details of the package should also appear to the right of the pane, but it remains empty.