erro complemento QGPT

537 views
Skip to first unread message

Allisson Fortuna

unread,
Mar 3, 2023, 7:54:38 AM3/3/23
to qgisb...@googlegroups.com
Bom dia a todos

Estou tendo erro ao instalar o complemento QGPT no QGIS 3.28.3-Firenze no POP OS 22.04
 Mas apresenta este erro. Tem como Resolver

Missing Dependencies


The following Python packages are required to use the plugin QChatGPT:

openai

Would you like to install them now?


Impossível carregar complemento 'QChatGPT' Devido a um erro ao chamar o método Class Factory().

ModuleNotFoundError: No module named 'openai'
Traceback (most recent call last):
  File "/home/allfor/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/QChatGPT/qchatqpt.py", line 45, in
    import openai
  File "/app/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'openai'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/share/qgis/python/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/allfor/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/QChatGPT/__init__.py", line 35, in classFactory
    from .qchatqpt import qchatgpt
  File "/app/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/allfor/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/QChatGPT/qchatqpt.py", line 51, in
    import openai
  File "/app/share/qgis/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'openai'


Versão do Python: 3.9.9 (main, Nov 10 2011, 15:00:00) [GCC 11.3.0]
Versão do QGIS: 3.28.3-Firenze Firenze, exported

Caminho do Python:
/app/share/qgis/python
/home/allfor/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python
/home/allfor/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins
/app/share/qgis/python/plugins
/usr/lib/python39.zip
/usr/lib/python3.9
/usr/lib/python3.9/lib-dynload
/usr/lib/python3.9/site-packages
/app/lib/python3.9/site-packages
/app/lib/python3.9/site-packages/MarkupSafe-2.1.1-py3.9-linux-x86_64.egg
/home/allfor/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python
/home/allfor/.var/app/org.qgis.qgis/data/QGIS/QGIS3/profiles/default/python/plugins/DsgTools

Allisson

Inteligência Geográfica ao alcance de todos

unread,
Mar 3, 2023, 1:30:22 PM3/3/23
to qgisb...@googlegroups.com
Instala a biblioteca openai pelo pip

--
Comunidade QGIS Brasil: http://qgisbrasil.org/
---
You received this message because you are subscribed to the Google Groups "qgisbrasil" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qgisbrasil+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qgisbrasil/CACgVZS66DKnEW%3DRMrz%3DqQvD3SJx31mucVhM4NWHxiVhNwfwifQ%40mail.gmail.com.

Tatiana Pará

unread,
Mar 13, 2023, 10:21:02 PM3/13/23
to qgisbrasil
Tive esse mesmo problema na nova versão , voltei a usar a 3.22.14 pra poder testar.

Tatiana Pará

unread,
Mar 13, 2023, 10:38:51 PM3/13/23
to qgisbrasil
Depois eu fiz como o Herbert sugeriu -  import openai no console python e funcionou no 3.28 , apenas o ícone que não aparece, mas dá pra abrir ali na barra de ferramenta dos complementos . Tranquilo. 
Reply all
Reply to author
Forward
0 new messages