Skip to content

Uncaught TypeError: 'RaiseException' object is not subscriptable  #33

@tina7

Description

@tina7

Steps to reproduce

  1. First
  2. Second
  3. Third
Traceback (most recent call last):
  File "C:\Users/Dell/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pgversion\dbtools\dbtools.py", line 134, in run
    rows = cursor.execute(sql)
           ^^^^^^^^^^^^^^^^^^^
psycopg2.errors.RaiseException: Table public.kontejneri_tvw does not has a serial defined
CONTEXT:  PL/pgSQL function versions._hasserial(character varying) line 34 at RAISE
SQL statement "select * from versions._hasserial('public.kontejneri_tvw')"
PL/pgSQL function versions.pgvsinit(character varying) line 57 at EXECUTE


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users/Dell/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pgversion\pgVersion.py", line 313, in doInit
    result, error = myDb.run(sql)
                    ^^^^^^^^^^^^^
  File "C:\Users/Dell/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pgversion\dbtools\dbtools.py", line 141, in run
    self._error_message(e)
  File "C:\Users/Dell/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\pgversion\dbtools\dbtools.py", line 307, in _error_message
    QMessageBox.information(None,'PG: Error',  str(e[1]))
                                                   ~^^^
TypeError: 'RaiseException' object is not subscriptable

pgversion 3.5.2, QGIS 3.34.14-Prizren on Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions