camelot-dev / camelot-dev/excalibur

Handle Excalibur Requirements like 'Ghostscript' Gracefully

Open
#111 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.8k
Forks
238
PR merge metrics
No merged PRs in 30d

Description

At the moment, Excalibur fails with a console error if Ghostscript was not found on MS Windows OS (See complete log below). I would like propose a usability improvements.

1. User launches Excalibur
2. Excalibur checks the requirements (ie. ghostscript)
3. Prints a user friendly comment about missing requirements along with a download URL
4. Continues to start Excalibur
5. Display a Warning Dialog in Excalibur default UI about missing requirements and where to download them.

I believe this improves the overall usability of the excalibur for both novice users and also those who will peek into logs and console errors.

```python

PS E:\> .\excalibur-windows-latest-ia32.exe
Creating new Excalibur configuration file in: C:\Users\a/excalibur/excalibur.cfg
Traceback (most recent call last):
File "arthur.py", line 5, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "c:\hostedtoolcache\windows\python\3.8.3\x86\lib\site-packages\PyInstaller\load
3, in exec_module
File "excalibur\cli.py", line 10, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "c:\hostedtoolcache\windows\python\3.8.3\x86\lib\site-packages\PyInstaller\load
3, in exec_module
File "excalibur\tasks.py", line 13, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "c:\hostedtoolcache\windows\python\3.8.3\x86\lib\site-packages\PyInstaller\load
3, in exec_module
File "site-packages\camelot\ext\ghostscript\__init__.py", line 24, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "c:\hostedtoolcache\windows\python\3.8.3\x86\lib\site-packages\PyInstaller\load
3, in exec_module
File "site-packages\camelot\ext\ghostscript\_gsprint.py", line 256, in
RuntimeError: Please make sure that Ghostscript is installed
[4376] Failed to execute script arthur```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Windows startup import path from arthur.py through excalibur/cli.py and excalibur/tasks.py, reproducing the missing-Ghostscript failure. Done means Excalibur starts without the console traceback, reports the missing requirement and download URL, and shows the warning in the default UI; the payload does not name a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.