Python Forum

Full Version: Python development envirornment
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all.
I am using VS2017 as Python development environment. But I don't have here any intellisense and my work goes slow due that.

For instance, I have the following simple code:

import sys
from matplotlib import pyplot
import cv2

im = cv2.imread("E:\\Face.jpg")

def plot_img(img):
    rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
    pyplot.imshow(rgb)

if im.any():
    plot_img(im)

if im.any():
    classifier = cv2.CascadeClassifier()
    classifier.load("E:\\haarcascade_eye.xml")
    classifier.detectMultiScale(im)
and I got error on

classifier.load("E:\\haarcascade_eye.xml")

OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-d54til6p\opencv\modules\core\src\persistence.cpp:717: error: (-49:Unknown error code -49) Input file is invalid in function 'cv::FileStorage::Impl::open' 
Stack trace:
 >  File "D:\Tempx\pythonapplication1\pythonapplication1.py", line 18, in <module>
 >    classifier.load("E:\\haarcascade_eye.xml")
Backend TkAgg is interactive backend. Turning interactive mode on.
Loaded '__main__'
The program 'python.exe' has exited with code -1 (0xffffffff).
but from this editor I don't know if this load method should return something or not. Is there any method to have intellisense on Python ?

[Image: Untitled.png]
I use kite with Visual Studio Code.
Edit (originally said VSCode which is different)
FYI: VSCode is separate from Virtual Studio Code, to install, see: https://python-forum.io/Thread-VS-Code-from-start
Yes, I know that, I intended to avoid to install another tool for development, but I guess I have no choice.