WinError 10061 – No Connection Could be made

I’m debugging a simple program, that has worked in the past. I’ve singled out the instruction where the error takes place, but I cannot figure out what triggers it. I’ve read all questions related to WinError 10061, but I do not see a clear answer I run Python 3 in Windows 8. I tried turning … Read more

How to install Openpyxl with pip

I have windows 10 (64 bit). I want to utilize the Openpyxl package to start learning how to interact with excel and other spreadsheets. I installed Python with “windowsx86-64web-basedinstaller” I have a 64 bit OS, was I mistaken when trying to install this version?

Tkinter error: Couldn’t recognize data in image file

Your code seems right, this is running for me on Windows 7 (Python 3.6): resulting in this tkinter GUI:  with this image as bll.jpg:  (imgur converted it to bll.png but this is working for me as well.) More options: This answer mentions, tkinter is working only with gif images. Try using a .gif image. If this is not working, use PIL as stated in this answer. … Read more

Meaning of list[-1] in Python

One of the neat features of Python lists is that you can index from the end of the list. You can do this by passing a negative number to []. It essentially treats len(array) as the 0th index. So, if you wanted the last element in array, you would call array[-1]. All your return c.most_common()[-1] statement does is call c.most_common and return the last … Read more

Why would cv2.COLOR_RGB2GRAY and cv2.COLOR_BGR2GRAY give different results?

RGB->gray conversion actually isn’t an average — different channels are weighed differently. Specifically: This is also mentioned in the documentation. Thus, it’s expected that RGB2GRAY and BGR2GRAY give different results. Regarding the discrepancy between sum-then-divide and divide-then-sum approaches, i.e. between and Recall that cv2.imread returns a uint8 numpy array. Thus, the latter operation (where all channels are combined … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)