I am trying to figure this out , but cant get a accurate solution any where.
when I click edit the image is broken
I checked my functions.php for any white space, there is none.
I check if gd-modules are installed, they are installed.
I tried using a funtion to force the use of gd, but even that didnt work out.
be sure to get installed phpx-gd this library is necesary to edit images, maybe too need imagick installed instead GD.
Related
I have been trying to get pyautogui to locate graphically a folder on my desktop but it fails no matter what I do:
This is my code (int_auto.py)
import pyautogui
button = pyautogui.locateCenterOnScreen('/Users/cadellteng/Desktop/Test-ground/randompy/pyxell2.png')
print(button)
I literally read through every SO thread I could find on this topic and some suggested that the photo needs to be lossless, so I used the cmd+shift+4 command on Mac to achieve this. A screenshot of my desktop and the reference image I used is attached here.
Note: This photo was converted to jpg because SO only allows photos up to 2MiB to be uploaded
Other things I tried are:
1. using locateAllOnScreen
2. grayscale = True
3. uninstall pyautogui and reinstalling pyautogui
But no matter what I did, I couldn't seems to be able to get the outcome I want. If it helps, I use a double screen and my code editor (VS Code) is on the secondary screen. What you see here as my desktop is my primary screen.
When the program is running nothing is blocking the folder.
There is also a warning on my terminal which I'm not sure if it's going to be useful:
/Users/cadellteng/Desktop/Test-ground/randompy/env/lib/python3.8/site-packages/rubicon/objc/ctypes_patch.py:21:
UserWarning: rubicon.objc.ctypes_patch has only been tested with Python 3.4 through 3.7.
You are using Python 3.8.2. Most likely things will work properly, but you may experience crashes if Python's internals have changed significantly. warnings.warn(
Do let me know if you require additional information.
EDIT June 01, 2020: So I thought that maybe pyautogui was not able to detect the folder because there are multiple folders and they all look the same and was not able to detect it. So I got this image off the web and tried to search it with it opened on my desktop with nothing else blocking it. But even then it was not able to find it.
I'm not sure if I am doing something wrong here but with each try, I am becoming more convinced that this API is broken.
The size of the picture might be a problem. When I use locateOnScreen to find an element in a browser and zoom out by, for example, 10%, then it will not locate it on screen even if is almost the same.
You have a Macbook so I think its because of the pixel density of the screen and the resolution pyautogui detects. You can check by:
image = pyautogui.LocateCenterOnScreen(‘image.png’)
print(image)
If you see coordinates above 2000 its probably because of the resolution. I suggest a workaround if you want to click the image like:
pyautogui.click(image.x/2, image.y/2, clicks=1, interval=10, button=‘left’) also try cropping the images as small as possible!
After I've reinstalled my system I'm seeing squares instead of some text (or emojis) in browsers.
Here's a sample view of outlook in brave browser:
I suppose it has something to do with locales/encoding, but I'm not sure how to fix this.
I've tried sudo dpkg-reconfigure locales but it didn't seem to have helped.
This is the output of locale command:
LANG=en_US.utf8
LANGUAGE=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8
And the fonts that are set in ubuntu gnome tweaks settings:
UPD:
As I noticed this only happens on some pages. I suppose it has to do with how a particular page renders text into an emoji? Still not sure how to fix this though.
Just in case someone has the same issue will post a solution I've found so far.
In essence I've narrowed it down to a problem with fonts since locale and encoding seems fine.
After installing ttf-ancient-fonts and ttf-ancient-fonts-symbola with apt:
So this is an improvement. Still I'm wondering what font I had previously that is missing now, since before the emojis were colored.
How can I make scapy be colored, like this:
https://upload.wikimedia.org/wikipedia/commons/1/1c/Windows_scapy_screenshot.png
When I am trying to edit the color theme with the following commad:
conf.color_theme = ColorOnBlackTheme()
It makes everything gibberish:
http://prntscr.com/ntcdq2
How can I fix it?
See https://scapy.readthedocs.io/en/latest/usage.html#customizing-the-terminal
1- Make sure you're using the latest version (or try the github version)
2- Make sure you have IPython Installed
I am a regular cygwin user, but since I added the curl functionality to my cygwin program, everytime I click on the cygwin icone, I get a change of screen color. The first image is what happen when I click on the cygwin icone.
the second image is how my screen should look like.
If you have a problem noticing the change of color, you could take a look at the windows icone on the bottom left of each image which appears different for each image while it should not.
Does anyone have an idea on what might have caused this, and how it could be fixed.
I also tried to find a similar question on stackoverflow but couldn't. Please let me know if you know a similar one where I might be able to get some help.
I have installed Plymouth on ArchLinux. And have done everything according the documentation. The problem is that the displayed splash, is not the theme I have set, In fact I couldn't find it in any of the themes in /usr/share/plymouth/themes! A gray screen is shown, with three white squares that toggle on and off one after each other. I can guess that this is a fallback theme, but I have set the default theme. What is the problem? Any hint is appreciated. I am using grub2 as bootloader.
As I had guessed this was a fallback theme. And as no one gave me a better answer all this while, I give my solution for this problem. It seems like something was broken in the changes that I had made, and I think it was in plymouth's own created files and not the config files. I uninstalled the plymouth, then deleted all the configuration files in the etc folder, and then reinstalled it again. All the files that I had deleted were created again, and everything was working. This time when I applied the modification things got working this time.