nvda-OpenAI icon indicating copy to clipboard operation
nvda-OpenAI copied to clipboard

Conflict between OpenAI and AI Content Describer Add-ons on NVDA Beta Version

Open rayo-alcantar opened this issue 1 year ago • 1 comments

Conflict between OpenAI and AI Content Describer Add-ons on NVDA Beta Version

Environment

  • NVDA Version: alpha-31030,421fe4ef
  • OpenAI Add-on Version: 24.02.11
  • AI Content Describer Add-on Version: 2023.11.20
  • Operating System: Windows 11 23H2 (10.0.22631) workstation AMD64
  • Python Version: 3.11.6
  • Comtypes Version: 1.2.0
  • Configobj Version: 5.1.0 with validate version 1.0.1

Description

When using the OpenAI add-on in conjunction with the AI Content Describer add-on (version 2023.11.20) on the NVDA beta version, an ImportError is encountered. This issue specifically arises when executing a script bound to the gesture 'NVDA+o', which is associated with an object recognition feature in the OpenAI add-on. Although this really happens when I want to interact with the graphical interface of the complement, that is, by pressing the Nvda more G, NVDA more E and NVDA more or as I mentioned above The only solution I have found is to uninstall one of both supplements.It is also worth mentioning that in the stable version of NVDA this does not happen.

Error Message

error executing script: <bound method GlobalPlugin.script_recognizeObject of GlobalPlugin ('globalPlugins.openai')> with gesture 'NVDA+o' Traceback (most recent call last): File "scriptHandler.pyc", line 295, in executeScript ... File "C:\Users\angel\AppData\Roaming\nvda\addons\AI Content Describer\globalPlugins\AIContentDescriber\PIL\Image.py", line 100, in from . import _imaging as core ImportError: cannot import name 'imaging' from 'PIL' (C:\Users\angel\AppData\Roaming\nvda\addons\AI Content Describer\globalPlugins\AIContentDescriber\PIL_init.py)

Steps to Reproduce

  1. Install the OpenAI add-on and the AI Content Describer add-on (version 2023.11.20) on the NVDA beta version.
  2. Activate the 'NVDA+o' gesture to initiate the object recognition feature in the OpenAI add-on.
  3. Observe the ImportError in the NVDA log.

Expected Behavior

The OpenAI add-on's object recognition feature should work seamlessly without causing import errors, even when used in conjunction with other add-ons like AI Content Describer.

Actual Behavior

An ImportError occurs, indicating a conflict or an incorrect dependency resolution between the OpenAI and AI Content Describer add-ons, specifically related to the PIL (Python Imaging Library) module.

Possible Solutions

  • Investigate the dependency management within both add-ons to ensure they do not interfere with each other's libraries.
  • Consider isolating or encapsulating dependencies to prevent such conflicts.

Additional Information

This issue suggests a broader problem with how add-ons manage and resolve their dependencies, particularly when multiple add-ons rely on the same external libraries.

Thank you for looking into this issue.

rayo-alcantar avatar Feb 18 '24 22:02 rayo-alcantar

Hello, Thanks for the report. I'll try to investigate ASAP. However I'm unable to reproduce the issue with NVDA alpha-31154,91f4f145, OpenAI 24.02.11 and AI Content Describer 2023.11.20.

AAClause avatar Feb 25 '24 02:02 AAClause