-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededminorIssues rated with a low priorityIssues rated with a low priority
Description
Describe the bug
It is currently not possible to debug the module in VS Code using the launch.json settings from the documentation. The error message currently reads:
Exception has occurred: ImportError
attempted relative import with no known parent package
File "C:\Users\stefan.greve\Desktop\repos\private\anonpy\src\anonpy\__main__.py", line 15, in <module>
from .anonpy import AnonPy, Endpoint
ImportError: attempted relative import with no known parent package
To Reproduce
{
"version": "0.2.0",
"configurations": [
{
"name": "AnonPy CLI",
"type": "python",
"request": "launch",
"module": "anonpy",
"justMyCode": true,
"args": [
"preview",
"--resource",
"Aozkv26f"
]
},
{
"name": "AnonPy Script",
"type": "python",
"request": "launch",
"program": "${file}",
"justMyCode": true,
"console": "integratedTerminal"
}
]
}Expected behavior
Start and execute the VS Code debugger.
Screenshots
Additional Information
- Module Version:
1.0.0-rc.2 - Python Version:
3.12 - Operating System:
Windows 10
Additional context
Links relevant to the problem:
- https://stackoverflow.com/q/58709973/10827244
- https://stackoverflow.com/q/53290328/10827244
- https://www.youtube.com/watch?v=Ad-inC3mJfU
This problem is also reproducible on the master branch and 1.0.0-rc.1.
The same error message appears when running this command:
python -X importtime .\src\anonpy\__main__.pyTraceback (most recent call last):
File "C:\Users\stefan.greve\Desktop\repos\private\anonpy\src\anonpy\__main__.py", line 14, in <module>
from .anonpy import AnonPy, Endpoint
ImportError: attempted relative import with no known parent packageMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededminorIssues rated with a low priorityIssues rated with a low priority
Type
Projects
Status
Todo