Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to launch profiler #23

Open
partnerinflight opened this issue Feb 4, 2022 · 22 comments
Open

Unable to launch profiler #23

partnerinflight opened this issue Feb 4, 2022 · 22 comments

Comments

@partnerinflight
Copy link

Configured VScode as per instructions. Have miniconda / austin installed. When trying to run the profiler, I see:

Starting Profiler in f:\adobe\photoframe\iCloudPhotoViewer.
Running 'C:\Program Files\P403n1x87\Austin\austin.exe' with args '-i 100 --pipe C:\tools\miniconda3\python.exe f:\adobe\photoframe\iCloudPhotoViewer\server\WebFrontend.py'.
austin process exited with code 1
The terminal process failed to launch (exit code: 1).

Terminal will be reused by tasks, press any key to close it.

Any idea what I might be doing wrong?

@P403n1x87
Copy link
Owner

@partnerinflight Thanks for reporting this. May I try to get some more information from you, please? Could you check the Austin channel in the Output panel and report whether there's any useful details that could help investigate this further? If the panel is not showing anything, could you try running the command directly in the terminal, e.g.

C:\Program Files\P403n1x87\Austin\austin.exe -i 100 --pipe C:\tools\miniconda3\python.exe f:\adobe\photoframe\iCloudPhotoViewer\server\WebFrontend.py

from within f:\adobe\photoframe\iCloudPhotoViewer and report the output in case of error (I'm assuming the actual command C:\tools\miniconda3\python.exe f:\adobe\photoframe\iCloudPhotoViewer\server\WebFrontend.py is working as expected).

@domkm
Copy link

domkm commented Feb 10, 2022

I'm experiencing the same thing.

Running 'sudo' with args 'austin -i 100 --pipe  PATH/TO/PYTHON PATH/TO/FILE.py'.
austin process exited with code 1
The terminal process failed to launch (exit code: 1).

Executing the same command (sudo austin -i 100 --pipe ...) in terminal completes with error.

There doesn't appear to be any output in VSCode from Austin.

@P403n1x87
Copy link
Owner

Executing the same command (sudo austin -i 100 --pipe ...) in terminal completes with error.

Judging from the use of sudo this must be on OSX and Austin is in the sudoers file. Would you be able to share the error that you get when running the command in a terminal, please?

@partnerinflight
Copy link
Author

@partnerinflight Thanks for reporting this. May I try to get some more information from you, please? Could you check the Austin channel in the Output panel and report whether there's any useful details that could help investigate this further? If the panel is not showing anything, could you try running the command directly in the terminal, e.g.

C:\Program Files\P403n1x87\Austin\austin.exe -i 100 --pipe C:\tools\miniconda3\python.exe f:\adobe\photoframe\iCloudPhotoViewer\server\WebFrontend.py

from within f:\adobe\photoframe\iCloudPhotoViewer and report the output in case of error (I'm assuming the actual command C:\tools\miniconda3\python.exe f:\adobe\photoframe\iCloudPhotoViewer\server\WebFrontend.py is working as expected).

Apologies for the delayed response. There's no output from the Austin channel in the Output pane.

Running the command directly in the terminal appears to work.

@domkm
Copy link

domkm commented Feb 10, 2022

in terminal completes with error.

This was a typo. Sorry. I meant to write "without error".

@P403n1x87
Copy link
Owner

Thanks for the additional info. It sounds like the problem is with how the extension launches Austin then. I'll see if I can reproduce this and hopefully push a fix for it soon. In the meantime, you can invoke Austin from the command line and then open the generated sample file with the extension, as a temporary workaround.

@P403n1x87
Copy link
Owner

I don't seem to be able to reproduce this issue 🙁 . I'm using:

VS Code 1.64.2
Austin VS Code 0.10.4
Austin 3.3.0

@partnerinflight @domkm may I ask for your versions, please?

@P403n1x87
Copy link
Owner

@partnerinflight In fact I was able to reproduce your issue. It's due to the Austin path containing a space! I thought I had fixed this issue, but apparently, I didn't cover all cases! Could you try a path with no spaces? Also, it looks like you're using the default path, which means that it should be the one on the PATH variable, so in principle, you could leave the field empty in the settings.

@domkm please bear with me while I try to find out what's wrong in your case 🙇

@domkm
Copy link

domkm commented Feb 11, 2022

VSCode:

Version: 1.64.2
Commit: f80445acd5a3dadef24aa209168452a3d97cc326
Date: 2022-02-09T22:00:58.347Z (1 day ago)
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.3.0

Austin VS Code: How do I check this? I think it's the latest one.

Austin: 3.3.0

@P403n1x87
Copy link
Owner

@domkm thanks! The version appears in the Extensions panel, but you're probably on the latest one since it's been around for a few months now. Version 0.10.5 should be available soon, with a fix for @partnerinflight's issue.

@P403n1x87
Copy link
Owner

@domkm if you're still using this extension, does the problem still persist with the latest release?

@shenrique38
Copy link

Hi, I just saw this extension after googling it, and decided to give it try. I believe I am running similar issues. I cannot see anything happening after I press Shift + F5 or running the task that I created for Austin as stated in the plugin page. In both ways I get the following message:

Executing task: austin: profile "pathToMyFile".py

Starting Profiler in "pathToMyGitFolder".
Running 'D:\Programs\PythonProfiler' with args '-i 100 --pipe D:\Programs\Anaconda\python.exe "pathToMyFile".py'.
austin process exited with code 1

  • The terminal process failed to launch (exit code: 1).
  • Terminal will be reused by tasks, press any key to close it.

I am using on VS code (v1.74) for windows 10

@shenrique38
Copy link

Hi, I just saw this extension after googling it, and decided to give it try. I believe I am running similar issues. I cannot see anything happening after I press Shift + F5 or running the task that I created for Austin as stated in the plugin page. In both ways I get the following message:

Executing task: austin: profile "pathToMyFile".py

Starting Profiler in "pathToMyGitFolder". Running 'D:\Programs\PythonProfiler' with args '-i 100 --pipe D:\Programs\Anaconda\python.exe "pathToMyFile".py'. austin process exited with code 1

  • The terminal process failed to launch (exit code: 1).
  • Terminal will be reused by tasks, press any key to close it.

I am using on VS code (v1.74) for windows 10

oh nvm, I just realized I needed to include the "\austin.exe" to the path in the settings of the plugin. Now it is working.

@vpicouet
Copy link

vpicouet commented Nov 27, 2023

Same issue:
Starting Profiler in undefined.
Running 'sudo' with args '/usr/local/bin/austin -i 100 --pipe /Users/Vincent/opt/anaconda3/envs/py38/bin/python /Users/Vincent/Github/fireball2-etc/notebooks/Observation.py'.
austin process exited with code 1

While running the code directly on VScode terminal works fine. I am on macos and added austin path into the extension parameters (/usr/local/bin/austin)

austin vs code: v0.17.0
austin: 3.6.0

Vs code Version : 1.84.2 (Universal)
Validation : 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Date : 2023-11-09T10:52:33.687Z
Electron : 25.9.2
ElectronBuildId : 24603566
Chromium : 114.0.5735.289
Node.js : 18.15.0
V8 : 11.4.183.29-electron.0
Système d’exploitation : Darwin arm64 23.1.0

@P403n1x87
Copy link
Owner

Starting Profiler in undefined.

This seems odd. Do you have a workspace open by any chance? The fact that undefined is showing up here makes me think that perhaps there isn't one open. I'll try to reproduce the problem, but in the meantime, it would be great if you could confirm that the problem goes away if a workspace is open 🙏

@pbrown12303
Copy link

pbrown12303 commented Aug 20, 2024

I have a similar problem, but I know the cause. I am profiling a plug-in for an application, gaphor. To run this, I need to execute the module gaphor. When I run austin, the terminal shows:

Running 'poetry' with args 'run austin -i 100 --pipe -V python -m gaphor'.

Note the period at the end of the command line - this is the cause of my problem. Gaphor expects anything on the command line after gaphor to be a file containing a gaphor model. When I run this command line in PowerShell without the period, it runs as expected.

How do I suppress the period at the end of the command line. FYI, my configuration is:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Profile gaphor",
            "type": "austin",
            "command": [
                "poetry",
                "run"
            ],
            "args": [
                "python",
                "-m",
                "gaphor"
            ]
        }
    ]
}

@P403n1x87
Copy link
Owner

@pbrown12303 the dot is not part of the command being executed

this.writeEmitter.fire(`Running '${this.command.cmd}' with args '${args}'.\r\n`);

If gaphorexpects arguments you should provide them with the task definition:

            "args": [
                "python",
                "-m",
                "gaphor",
                "modelfile"
            ]

@pbrown12303
Copy link

The problem is that I don't want any argument after "gaphor". Not even a "."

@P403n1x87
Copy link
Owner

@pbrown12303 there are no extra arguments after gaphor in your task definition. The dot is not part of the command being executed, but only part of the logging.

@pbrown12303
Copy link

@P403n1x87 I realize that there are no extra arguments in my task definition. The problem is that when I execute the task, the execution itself seems to add a "." to the end. That is what I need to suppress.
image

@pbrown12303
Copy link

And now it seems to be working despite the period! For the time being, please ignore my report. I will post further after I have more information.

@P403n1x87
Copy link
Owner

@P403n1x87 I realize that there are no extra arguments in my task definition. The problem is that when I execute the task, the execution itself seems to add a "." to the end. That is what I need to suppress. image

That dot is part of the logging, it is not part of the command being executed.

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

No branches or pull requests

6 participants