botcity-dev / botcity-framework-core-python

BotCity Framework - Python
https://documentation.botcity.dev/frameworks/desktop/
Apache License 2.0
118 stars 21 forks source link

Problem running Desktop bot on Linux OS #44

Closed bugelseif closed 1 year ago

bugelseif commented 1 year ago

Describe the bug When executing the command python3 bot.py an error occurs in the PIL library, returning the following error:

ImportError: ImageGrab is macOS and Windows only

error_message

The steps described in the documentation for possible problems in the Linux system were performed.

Expected behavior The bot should run and open the system's default browser.

Steps to Reproduce

  1. BotCity template download for desktop
  2. Install dependencies
  3. Run the command python3 bot.py

Possible Solution Researching the problem, I found a lib that replaces ImageGrab for Linux systems.

Suggestion: https://stackoverflow.com/questions/43520757/imagegrab-alternative-in-linux Package: https://pypi.org/project/pyscreenshot/

My Platform

Additional context

bugelseif commented 1 year ago

Additional context Setting botcity-framework-core to version 0.4.0, the bot runs normally.

hhslepicka commented 1 year ago

I believe Linux support for ImageGrab was added after Pillow 7.1.0. If it works, we can change the requirements.txt to request a version greater or equal 7.1.0. Source: https://pillow.readthedocs.io/en/stable/reference/ImageGrab.html