Title: OSError: Windows Error 6, using the click CLI argument parser package. · Issue #501 · microsoft/vscode-python · GitHub
Open Graph Title: OSError: Windows Error 6, using the click CLI argument parser package. · Issue #501 · microsoft/vscode-python
X Title: OSError: Windows Error 6, using the click CLI argument parser package. · Issue #501 · microsoft/vscode-python
Description: Environment data VS Code version: 1.19.1 Python Extension version: 0.9.1 Python Version: 3.6.3 OS and version: Win 7 Enterprise 64bit Service pack 1 Actual behavior I am using the click package version 6.7 to parse CLI arguments. When ru...
Open Graph Description: Environment data VS Code version: 1.19.1 Python Extension version: 0.9.1 Python Version: 3.6.3 OS and version: Win 7 Enterprise 64bit Service pack 1 Actual behavior I am using the click package ver...
X Description: Environment data VS Code version: 1.19.1 Python Extension version: 0.9.1 Python Version: 3.6.3 OS and version: Win 7 Enterprise 64bit Service pack 1 Actual behavior I am using the click package ver...
Opengraph URL: https://github.com/microsoft/vscode-python/issues/501
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OSError: Windows Error 6, using the click CLI argument parser package.","articleBody":"## Environment data\r\nVS Code version: 1.19.1\r\nPython Extension version: 0.9.1\r\nPython Version: 3.6.3\r\nOS and version: Win 7 Enterprise 64bit Service pack 1\r\n\r\n## Actual behavior\r\nI am using the **click package version 6.7** to parse CLI arguments.\r\nWhen running the example code in Visual Studio Code it errors out with **OSError: Windows Error 6**.\r\n\r\n## Expected behavior \r\nThe same code is running in a terminal window without issue.\r\n```\r\n(C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3) C:\\Users\\kurt\\Projects\\laser\r\n_control_log\u003epython click_main.py --count 3\r\nYour name: Kurt\r\nHello Kurt!\r\nHello Kurt!\r\nHello Kurt!\r\n```\r\n## Steps to reproduce: \r\n- pip install click \r\n- In VS Code create test.py (first example on http://click.pocoo.org/5/) \r\n```\r\nimport click\r\n\r\n@click.command()\r\n@click.option('--count', default=1, help='Number of greetings.')\r\n@click.option('--name', prompt='Your name',\r\n help='The person to greet.')\r\ndef hello(count, name):\r\n \"\"\"Simple program that greets NAME for a total of COUNT times.\"\"\"\r\n for x in range(count):\r\n click.echo('Hello %s!' % name)\r\n\r\nif __name__ == '__main__':\r\n hello()\r\n```\r\n- press F5 twice\r\n- check debug console\r\n\r\n## Logs\r\n**Output from ```Python``` output panel** \r\n```\r\n##########Linting Output - pylint##########\r\nNo config file found, using default configuration\r\n************* Module click_main\r\n1,0,convention,C0111:Missing module docstring\r\n13,8,convention,C0103:Invalid variable name \"x\"\r\n13,8,warning,W0612:Unused variable 'x'\r\n17,4,error,E1120:No value for argument 'count' in function call\r\n17,4,error,E1120:No value for argument 'name' in function call\r\n32,-1,warning,W0105:String statement has no effect\r\n\r\n----------------------------------------------------------------------\r\n\r\nYour code has been rated at -10.00/10 (previous run: -10.00/10, +0.00)\r\n``` \r\n**Output from ```Console window``` (Help-\u003eDeveloper Tools menu)**\r\n```\r\n hello()\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\core.py\", line 722, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\core.py\", line 696, in main\r\n with self.make_context(prog_name, args, **extra) as ctx:\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\core.py\", line 621, in make_context\r\n self.parse_args(ctx, args)\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\core.py\", line 880, in parse_args\r\n value, args = param.handle_parse_result(ctx, opts, args)\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\core.py\", line 1396, in handle_parse_result\r\n value = self.full_process_value(ctx, value)\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\core.py\", line 1680, in full_process_value\r\n return self.prompt_for_value(ctx)\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\core.py\", line 1655, in prompt_for_value\r\n value_proc=lambda x: self.process_value(ctx, x))\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\termui.py\", line 89, in prompt\r\n value = prompt_func(prompt)\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\termui.py\", line 72, in prompt_func\r\n echo(text, nl=False, err=err)\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\utils.py\", line 260, in echo\r\n file.flush()\r\n File \"C:\\Users\\kurt\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\click\\_winconsole.py\", line 164, in write\r\n raise OSError(self._get_error_message(GetLastError()))\r\nOSError: Windows error 6\r\n```\r\n**Launch.json Configuration**\r\n``` \"version\": \"0.2.0\",\r\n \"configurations\": [\r\n {\r\n \"name\": \"Python\",\r\n \"type\": \"python\",\r\n \"request\": \"launch\",\r\n \"stopOnEntry\": true,\r\n \"pythonPath\": \"${config:python.pythonPath}\",\r\n \"program\": \"${file}\",\r\n \"cwd\": \"${workspaceFolder}\",\r\n \"env\": {},\r\n \"envFile\": \"${workspaceFolder}/.env\",\r\n \"debugOptions\": [\r\n \"RedirectOutput\"\r\n ]\r\n }\r\n```\r\n**Settings.json changes**\r\nUSER SETTINGS\r\n```\r\n{\r\n \"workbench.startupEditor\": \"newUntitledFile\",\r\n \"terminal.integrated.shell.windows\": \"C:\\\\Windows\\\\System32\\\\cmd.exe\",\r\n}\r\n```\r\nWORKSPACE SETTINGS\r\n```\r\n{\r\n \"python.pythonPath\": \"C:\\\\Users\\\\kurt\\\\AppData\\\\Local\\\\Continuum\\\\anaconda3\\\\python.exe\"\r\n}\r\n```\r\n**File handle used by click to write to the console**\r\nI could follow the chain of calls down to a certain point, but then no more.\r\n```\r\n\u003cConsoleStream\u003e\r\n _text_stream:\u003c_io.TextIOWrapper encoding='utf-16-le'\u003e\r\n _CHUNK_SIZE:8192\r\n _finalizing:False\r\n _stream:\u003c_FixupStream\u003e\r\n buffer:\u003c_FixupStream\u003e\r\n _stream:\u003cclick._winconsole._WindowsConsoleWriter object at 0x01B18D10\u003e\r\n _abc_cache:\u003c_weakrefset.WeakSet object at 0x01875030\u003e\r\n _abc_negative_cache:\u003c_weakrefset.WeakSet object at 0x01875050\u003e\r\n _abc_negative_cache_version:36\r\n _abc_registry:\u003c_weakrefset.WeakSet object at 0x01862FB0\u003e\r\n closed:False\r\n handle:828\r\n Results View:Expanding the Results View will run the iterator\r\n closed:False\r\n encoding:'utf-16-le'\r\n errors:'strict'\r\n line_buffering:True\r\n newlines:None\r\n Results View:Expanding the Results View will run the iterator\r\nbuffer:\u003cvisualstudio_py_debugger.DebuggerBuffer object at 0x017A6930\u003e\r\n buffer:\u003c_io.FileIO name='\u003cstdout\u003e' mode='wb' closefd=False\u003e\r\n _blksize:8192\r\n _finalizing:False\r\n closed:False\r\n closefd:False\r\n mode:'wb'\r\n name:'\u003cstdout\u003e'\r\nResults View:Expanding the Results View will run the iterator\r\n```","author":{"url":"https://github.com/killwas","@type":"Person","name":"killwas"},"datePublished":"2017-12-31T12:35:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/501/vscode-python/issues/501"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9353c9a4-95b2-d869-6308-ac27670c47f8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B58:C8AE2:7E02919:B0CDAD7:6A503E0D |
| html-safe-nonce | 3c0fc8cebf0d7dac465fd2241723b76a58fa297ce007c292fc8d7063c65fe401 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjU4OkM4QUUyOjdFMDI5MTk6QjBDREFENzo2QTUwM0UwRCIsInZpc2l0b3JfaWQiOiI3NzUxODcwOTQ4MzAzNzE1ODUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 57d365a66231331b77a842069dc778e80e0c5c4a4a5a45582e46e8e50caf0bc9 |
| hovercard-subject-tag | issue:285255366 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/vscode-python/501/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aba694ebf85034298d1b3d44e680bf4d3d821d9156c002a0e3ebceea35183596/microsoft/vscode-python/issues/501 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aba694ebf85034298d1b3d44e680bf4d3d821d9156c002a0e3ebceea35183596/microsoft/vscode-python/issues/501 |
| og:image:alt | Environment data VS Code version: 1.19.1 Python Extension version: 0.9.1 Python Version: 3.6.3 OS and version: Win 7 Enterprise 64bit Service pack 1 Actual behavior I am using the click package ver... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | killwas |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-python git https://github.com/microsoft/vscode-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 106462765 |
| octolytics-dimension-repository_nwo | microsoft/vscode-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 49946255 |
| octolytics-dimension-repository_parent_nwo | DonJayamanne/pythonVSCode |
| octolytics-dimension-repository_network_root_id | 49946255 |
| octolytics-dimension-repository_network_root_nwo | DonJayamanne/pythonVSCode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width