self-operating-computer icon indicating copy to clipboard operation
self-operating-computer copied to clipboard

Error parsing JSON: X get_image failed: error 8 (73, 0, 967)

Open Andy1996247 opened this issue 2 years ago • 11 comments

[Self-Operating Computer] Hello, I can help you with anything. What would you like done? [User] google the word HI Error parsing JSON: X get_image failed: error 8 (73, 0, 967) [Self-Operating Computer][Error] something went wrong :( [Self-Operating Computer][Error] AI response Failed take action after looking at the screenshot

what could be the problem?

Andy1996247 avatar Dec 02 '23 17:12 Andy1996247

What operating system are you on? Also, do you have multiple monitors?

michaelhhogue avatar Dec 02 '23 17:12 michaelhhogue

What operating system are you on? Also, do you have multiple monitors?

Ubuntu 22. And yes I run 2 monitors.

Andy1996247 avatar Dec 02 '23 17:12 Andy1996247

There are some known issues with multi-monitor setups. #57 proposes a change that uses only the active monitor on Linux.

michaelhhogue avatar Dec 02 '23 18:12 michaelhhogue

#57 was merged, but not sure if it ever fixed the issue. Let us know if you're still having the issue which in that case a new PR would be great

joshbickett avatar Dec 06 '23 17:12 joshbickett

@joshbickett @Andy1996247 #57 didn't fix this issue. The active monitor needs to be selected in the screenshot when there are multiple monitors connected. Will look into this tonight.

michaelhhogue avatar Dec 06 '23 17:12 michaelhhogue

#57 was merged, but not sure if it ever fixed the issue. Let us know if you're still having the issue which in that case a new PR would be great

Same issue for me. Fresh ubuntu-22.04.3-desktop-amd64.iso VM and only one monitor, but I'm using a 4k monitor. Not sure if this is a problem. Used pip install self-operating-computer to install.

SebastianHausler avatar Dec 13 '23 00:12 SebastianHausler

#57 was merged, but not sure if it ever fixed the issue. Let us know if you're still having the issue which in that case a new PR would be great

Same issue for me. Fresh ubuntu-22.04.3-desktop-amd64.iso VM and only one monitor, but I'm using a 4k monitor. Not sure if this is a problem. Used pip install self-operating-computer to install.

I am using Ubuntu 20.04.2 and had a similar issue.

I used this issues responses to solve it;

issue: #80

This seems to be related to Pillow and ImageGrab on machines (possibly just virtual machines) that have Wayland enabled.

Here is the fix that worked for me on Ubuntu 22.04.3 LTS in a virtualbox.

https://stackoverflow.com/questions/75752576/pillow-imagegrab-grab-not-working-on-a-virtual-machine

# Open this file
/etc/gdm3/custom.conf
# Set this value to disable Wayland
WaylandEnable=false

then

# Restart gdm3
sudo systemctl restart gdm3

ph47s74x avatar Dec 13 '23 14:12 ph47s74x

#57 was merged, but not sure if it ever fixed the issue. Let us know if you're still having the issue which in that case a new PR would be great

Same issue for me. Fresh ubuntu-22.04.3-desktop-amd64.iso VM and only one monitor, but I'm using a 4k monitor. Not sure if this is a problem. Used pip install self-operating-computer to install.

I am using Ubuntu 20.04.2 and had a similar issue.

I used this issues responses to solve it;

issue: #80

This seems to be related to Pillow and ImageGrab on machines (possibly just virtual machines) that have Wayland enabled. Here is the fix that worked for me on Ubuntu 22.04.3 LTS in a virtualbox. https://stackoverflow.com/questions/75752576/pillow-imagegrab-grab-not-working-on-a-virtual-machine

# Open this file
/etc/gdm3/custom.conf
# Set this value to disable Wayland
WaylandEnable=false

then

# Restart gdm3
sudo systemctl restart gdm3

thankyou this worked

Andy1996247 avatar Dec 13 '23 21:12 Andy1996247

@michaelhhogue since #80 is a fix for this issue. I wonder if we could incorporate that fix into the project some how to avoid these issues in the future. Let me know if you have thoughts

joshbickett avatar Dec 21 '23 15:12 joshbickett

@joshbickett It probably would be best to add this to the README or in a separate file that a link could point to. Even MSS, which I've looked into as a better screenshot solution, would still produce this error. From what I've found, it would take a lot of weird dependencies to actually add support for Wayland to resolve this issue automatically.

If no one else opens one, I'll probably do a PR for this after I'm done working on LLaVA support.

michaelhhogue avatar Dec 21 '23 15:12 michaelhhogue

Ok sounds good. I wonder if it makes sense to create a linux-readme.md or something like that which we can link to from the readme.md for a more in-depth install? Not sure what the standard is in these situations

joshbickett avatar Dec 21 '23 15:12 joshbickett