Failed to use ptvsd_launcher.py with error "ValueError: invalid literal for int() with base 10: '--client'"
See original GitHub issueEnvironment data
VS Code version: Code - Insiders 1.29.0-insider (d7ac6e838f51a03f7d417b4758f5fb075878d615, 2018-11-01T06:11:43.390Z) OS version: Darwin x64 17.7.0 Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.6
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-4870HQ CPU @ 2.50GHz (8 x 2500) |
GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: enabled rasterization: enabled video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
Load (avg) | 2, 2, 2 |
Memory (System) | 16.00GB (6.67GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
Extensions (8)
Extension | Author (truncated) | Version |
---|---|---|
tslint | eg2 | 1.0.40 |
vscode-azurefunctions | ms- | 0.12.0 |
python | ms- | 2018.9.2 |
azure-account | ms- | 0.5.0 |
csharp | ms- | 1.17.0 |
vscode-docker | Pet | 0.3.1 |
java | red | 0.33.0 |
vscode-java-debug | vsc | 0.15.0 |
Actual behavior
As discussed offline, I’m preparing to use the new debug.getLauncherCommand
api as described here: https://github.com/Microsoft/vscode-python/issues/3121 in conjunction with the Azure Functions extension. I specified the launcherCommand manually just to make sure it would work like this:
"languageWorkers__python__arguments": "/Users/ericjizba/.vscode-insiders/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/ptvsd_launcher.py --client --host 127.0.0.1 --port 9091"
But I get this error in the logs for the func cli:
[11/5/18 6:22:28 PM] Starting language worker process:python /Users/ericjizba/.vscode-insiders/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/ptvsd_launcher.py --client --host 127.0.0.1 --port 9091 "/usr/local/Cellar/azure-functions-core-tools/2.1.725/workers/python/worker.py" --host 127.0.0.1 --port 64606 --workerId e9e619ac-29fd-491f-9dfc-3362894a18be --requestId 3dce2fc5-6be1-4d8a-a598-b59a24a9de7e --grpcMaxMessageLength 134217728
[11/5/18 6:22:28 PM] python process with Id=47489 started
[11/5/18 6:22:28 PM] Found the following functions:
[11/5/18 6:22:28 PM] Host.Functions.HttpTrigger
[11/5/18 6:22:28 PM]
[11/5/18 6:22:28 PM] Host initialized (342ms)
[11/5/18 6:22:28 PM] Host started (351ms)
[11/5/18 6:22:28 PM] Job host started
[11/5/18 6:22:28 PM] Traceback (most recent call last):
[11/5/18 6:22:28 PM] File "/Users/ericjizba/.vscode-insiders/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/ptvsd_launcher.py", line 40, in <module>
[11/5/18 6:22:28 PM] port_num = int(sys.argv[1])
[11/5/18 6:22:28 PM] ValueError: invalid literal for int() with base 10: '--client'
[11/5/18 6:22:28 PM] Language Worker Process exited.
[11/5/18 6:22:28 PM] python exited with code 1
[11/5/18 6:22:28 PM] ValueError: invalid literal for int() with base 10: '--client'.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ValueError: invalid literal for int() with base 10: '' - Stack Overflow
2. For anyone currently looking here. The error may be that one of the lines isn't in integer form. · 1. i got...
Read more >Python ValueError: invalid literal for int() with base 10
This error can frequently occur when converting user-input to an integer-type using the int() function. This problem happens because Python stores the input ......
Read more >ValueError: invalid literal for int() with base 10 in Python
The Python "ValueError: invalid literal for int() with base 10" occurs when we pass a string that cannot be directly converted to an...
Read more >ValueError: invalid literal for int() with base 10
The error message invalid literal for int() with base 10 would seem to indicate that you are passing a string that's not an...
Read more >Python ValueError: invalid literal for int() with base 10 Solution
Our error message tells us there is an invalid literal for an integer in base 10. This means the value we have passed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome that works for me! Any changes to the
debug.getLauncherCommand
api based on this?I will note that the traceback is misleading as that code doesn’t exist in https://github.com/Microsoft/vscode-python/blob/master/pythonFiles/experimental/ptvsd_launcher.py . Either the copy you are working from is old (are you running against the development build of the extension), or something else is going on.