visual-studio-code

matplotlib - module 'sip' has no attribute 'setapi'

醉酒当歌 提交于 2021-02-08 12:35:35
问题 I just set up the VS Code with all the Python extensions. Python version is 3.8.3 through Anaconda. The interpreter is venv. When I run this code import matplotlib.pyplot as plt An error shows - Exception has occurred: AttributeError module 'sip' has no attribute 'setapi' File "C:\test.py", line 145, in <module> import matplotlib.pyplot as plt I've tried uninstalling and reinstalling matplotlib, but to no avail. 回答1: This worked for me. python -m pip install matplotlib==3.2 回答2: There seems

Debugger Not Stopping at Breakpoints in VS Code for Python

六月ゝ 毕业季﹏ 提交于 2021-02-08 12:19:36
问题 I have just installed VS Code and the Python extension, and I have not been able to get the debugger to work. Every time I try to use the debugger, it just skips over any breakpoints that I have set and runs the program like normal. I am using VS Code on a Windows 10 PC with Python 3.7.3 and the Python extension installed. I followed the instructions here (https://code.visualstudio.com/docs/python/python-tutorial) to make a test folder called 'hello' in C:\python_work\hello and create a

Debugger Not Stopping at Breakpoints in VS Code for Python

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 12:18:05
问题 I have just installed VS Code and the Python extension, and I have not been able to get the debugger to work. Every time I try to use the debugger, it just skips over any breakpoints that I have set and runs the program like normal. I am using VS Code on a Windows 10 PC with Python 3.7.3 and the Python extension installed. I followed the instructions here (https://code.visualstudio.com/docs/python/python-tutorial) to make a test folder called 'hello' in C:\python_work\hello and create a

my flutter/firebase app showing no app has been configured yet

淺唱寂寞╮ 提交于 2021-02-08 11:45:54
问题 i am making app in flutter/firebase and i am experiencing the following error on my visual studio code terminal:- Xcode build done. 522.2s 6.26.0 - [Firebase/Core][I-COR000005] No app has been configured yet. 6.26.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the

Unable to install VS Code for Mac

时光怂恿深爱的人放手 提交于 2021-02-08 11:32:31
问题 I have downloaded VS Code for Mac, but I'm unable to install it on my MacBook. I get the following error: "Visual Studio Code - Insiders" can't be opened because Apple cannot check it for malicious software. Here is a sreen shot of the full error message: How can I get VS Code to install and run? 回答1: The problem is caused by macOS requiring apps to be notarized by Apple. The best way around this problem is to simply right-click on the app and select Open. If this doesnt work, first move the

How do I set up imports for custom modules in VS Code?

旧巷老猫 提交于 2021-02-08 10:40:25
问题 I am trying to bring my (working/executable) project from PyCharm to VS Code. My folder structure looks like this (simplified): root |- .venv |- src |- helper |- windows |- main |- __init__.py |- main_window.py |- __init__.py I'm trying to execute the src/__init__.py file, which has the following code: from PyQt5.QtWidgets import QApplication from src.windows.main import MainWindow import sys if __name__ == '__main__': app = QApplication(sys.argv) w = MainWindow() sys.exit(app.exec_()) This

Find number and replace + 1

拟墨画扇 提交于 2021-02-08 10:33:36
问题 I have a large file with a list of objects that have an incrementing page # ie [ {page: 1}, {page: 2}, {page: 3} ] I can find each instance of page: # with page: (\d) in vscode's ctrl+f finder. How would I replace each of these numbers with # + 1? 回答1: It's not possible to perform arithmetic with regex. I use LINQPad to execute these small kind of scripts. An example of how I would do it is in the c# program below. void Main() { var basePath = @"C:\"; // Get all files with extension .cs in

VS Code extension API for registering pointer down and up and translating coordinates to line/character position

微笑、不失礼 提交于 2021-02-08 10:33:14
问题 I have developed a VS Code Box Drawing extension which works by using selection's start and end positions to work out a level rectangle between the two positions in the text and replaces the edge characters of the rectangle with Unicode box drawing characters. This works great with a selection start and end positions provided, but it also requires at least white space to already extend all the way to the right edge of where the box is supposed to end, otherwise the selection cannot be made

VSCode Asp.Net core command line arguments when debugging?

只愿长相守 提交于 2021-02-08 09:15:34
问题 Just been reading this article from Scott Allen. The approach to specify command line arguments to .net core seems intersing, but how do we pass those arguments from VS Code when running with debugger (Normally using F5 command if launch.json is setup)? e.g dotnet run dropdb migratedb seeddb 回答1: Copying over answer from comment In your launch.json , try adding: "args": ["dropdb", "migratedb", "seeddb"] to the target launch configuration. 来源: https://stackoverflow.com/questions/41189755

VSCode Asp.Net core command line arguments when debugging?

拈花ヽ惹草 提交于 2021-02-08 09:09:11
问题 Just been reading this article from Scott Allen. The approach to specify command line arguments to .net core seems intersing, but how do we pass those arguments from VS Code when running with debugger (Normally using F5 command if launch.json is setup)? e.g dotnet run dropdb migratedb seeddb 回答1: Copying over answer from comment In your launch.json , try adding: "args": ["dropdb", "migratedb", "seeddb"] to the target launch configuration. 来源: https://stackoverflow.com/questions/41189755