question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger on Mac caught strange exceptions

See original GitHub issue

Environment data

VS Code version: 1.20.1 Python Extension version: 2018.1.0 Python Version: 3.6.4 OS and version: MacOS 10.13.3 (17D47)

Actual behavior

caught exceptions like

AttributeError, module 'http.client' has no attribute '__path__'
AttributeError, module 'OpenSSL.crypto' has no attribute '__path__'
AttributeError, module 'OpenSSL.crypto' has no attribute '__path__'

Expected behavior

finish with no exceptions, just like on Windows.

Steps to reproduce:

import requests
print("hello")

Logs

Output from Python output panel

Output from Console window (Help->Developer Tools menu)

[/Users/johnlyu/.vscode/extensions/ms-vscode.cpptools-0.15.0]: Command `workbench.action.gotoSymbol` appears multiple times in the `commands` section.
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4183 [/Users/johnlyu/.vscode/extensions/ms-vscode.cpptools-0.15.0]: Command `workbench.action.showAllSymbols` appears multiple times in the `commands` section.
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] activate
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Python Extension: Failed to get conda info from conda null
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Lintings failed on open
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] File: file:///Users/johnlyu/Projects/Attendance/test.py
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Message: TypeError: Cannot read property 'uri' of undefined
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] activating extension
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Lintings failed on open
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] File: file:///Users/johnlyu/Library/Python/3.6/lib/python/site-packages/urllib3/packages/six.py
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Message: TypeError: Cannot read property 'uri' of undefined
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Lintings failed on open
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] File: file:///Users/johnlyu/Library/Python/3.6/lib/python/site-packages/cryptography/utils.py
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
/Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Message: TypeError: Cannot read property 'uri' of undefined
t.log @ /Applications/Visual Studio Code 2.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253
console.ts:123 [Extension Host] (node:2515) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
PaleNeutroncommented, May 4, 2018

@DonJayamanne Everything works fine! Thanks a lot.

0reactions
DonJayamannecommented, May 3, 2018

@PaleNeutron Please could you make the following change and test the issue once again:

  • Ensure you have the latest version of the extension
  • Change "type": "python", to "type": "pythonExperimental", in your launch.json
Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugger on Mac caught strange exceptions #858 - GitHub
Debugger on Mac caught strange exceptions #858 ... Expected behavior. finish with no exceptions, just like on Windows.
Read more >
Visual Studio: How to break on handled exceptions?
With a solution open, go to the Debug - Windows - Exception Settings ( Ctrl + Alt + E ) menu option. From...
Read more >
Managed Exception support in Mac Debugger?
I can't find any UI in the Mac debugger for managed exceptions (so I can stop on particular ones). The debugger also doesn't...
Read more >
Graphical Debugger | Apple Developer Forums
When C++ exceptions are thrown on the main thread, they are caught by a CFRunLoop exception handler and rethrown, which destroys all the...
Read more >
Troubleshoot Breakpoints in the Visual Studio Debugger
If a breakpoint is disabled or couldn't be set, it's displayed as a hollow circle. Look here information on problems that can occur...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found