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:
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__.py
Traceback (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 package
Describe the bug
It is currently not possible to debug the module in VS Code using the
launch.jsonsettings from the documentation. The error message currently reads: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
1.0.0-rc.23.12Windows 10Additional context
Links relevant to the problem:
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__.py