1

So I have this launch.json

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run main.py",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/main.py",
            "console": "integratedTerminal",
            "justMyCode": true,
            "args": ["-o", "storage/test",
                "-b", "projects/robustnav_baselines/experiments/robustnav_train", "objectnav_robothor_vanilla_rgb_augmenter_resnet_ddppo",
                "-trd", "dylan/subsample_task/1_percent/train"]
        }
    ]
}

Which essentially runs this command python main.py -o storage/test -b projects/robustnav_baselines/experiments/robustnav_train objectnav_robothor_vanilla_rgb_augmenter_resnet_ddppo -trd dylan/subsample_task/1_percent/train. When I run this command in the vs code terminal it runs fine, but when I use the debugger associated with the launch.json file. I get this exception:

allenact/init.py enter image description here

Then as we can see workspaceFolder is at the root

enter image description here

So I'm not sure why it's not finding the allenact module even though you can clearly access it from the root as it is a folder accessible in the root with an __init__.py file.

Here is my terminal output when I run debugger. VS code will output commands in terminal when you run debugger:

cd /home/dyung6/robustnav ; /usr/bin/env /home/dyung6/anaconda3/envs/robustNav/bin/python /home/dyung6/.vscode-server/extensions/ms-python.python-2022.2.1924087327/pythonFiles/lib/python/debugpy/launcher 33361 -- /home/dyung6/robustnav/main.py -o storage/test -b projects/robustnav_baselines/experiments/robustnav_train objectnav_robothor_vanilla_rgb_augmenter_resnet_ddppo -trd dylan/subsample_task/1_percent/train

1 Answer 1

2

Open the "run and debug" tab from the sidebar and at the bottom you would find a section called "breakpoints".

Under that, uncheck "raised exceptions" and "user uncaught exceptions".

Sign up to request clarification or add additional context in comments.

6 Comments

unfortunately it's still throwing the same exception
@Gooby please check updated answer
hmm okay so it got past the import error now it's complaining about allenact not having an attribute called main. This is so weird.
Could you update your question with the full error
nvm figured it out I accidentally changed the main.py file to try and fix the first problem which caused the new issue, but your answer solved the original problem
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.