SyntaxError: Non-UTF-8 code starting with ‘\xe6‘ in file
How to Solve this error:
Add the
#coding:utf-8
SyntaxError: Non-UTF-8 code starting with ‘\xe6‘ in file
How to Solve this error:
Add the
#coding:utf-8
Sqlog can’t connect to MySQL (1045 error)
Error no.1045 solution
1。 Stop MySQL service: run net stop MySQL
2。 Modify my.ini in the MySQL source folder, use the search function to find mysqld, add a line of skip grant tables under it, and save it
3。 Start MySQL service: run net start MySQL
4。 OK, input the connection
The reason for the error is that the resource package has a Chinese path
Error: (- 215: assertion failed)
Source code:
import cv2
img = cv2.imread('D:\Work\study\jaffe\train\happy\KA.HA1.29.tiff')
cv2.namedWindow("Image")
cv2.imshow('Image', img)
cv2.waitKey (0)
Error:
traceback (most recent call last):
file “d”:/work/study/study_ cv.py ”, line 6, in
cv2.imshow(‘Image’, img)
cv2.error: OpenCV(3.4.2) C:\Miniconda3\conda-bld\opencv-suite_ 1534379934306\work\modules\highgui\src\ window.cpp:356 : error: (-215:Assertion failed) size.width> ;0 && size.height> ;0 in function ‘cv::imshow’
Reason:
it can be seen from pychar that
here is understood as escape character
Correction:
import cv2
img = cv2.imread('D:\Work\study\jaffe\\train\happy\KA.HA1.29.tiff')
cv2.namedWindow("Image")
cv2.imshow('Image', img)
cv2.waitKey (0)