Am 26.07.2019 um 05:20 schrieb Justin Pryzby:

> Is there any way to avoid output like this?
>
> ************* Module telsasoft.db
> E: 15, 0: No name 'ProgrammingError' in module 'pg'
> (no-name-in-module)
> ...
>
> I assume it's related to this:
>
> |    def __getattr__(self, name):
> |        # All undefined members are same as in underlying connection:
> |        if self.db:
> |            return getattr(self.db, name)
> |        else:
> |            raise _int_error('Connection is not valid')

The errors complain about not existing members of the module, but the code above gets members of the connection, not of the module.

Also, these look like linter errors to me, not runtime errors.

Can you check whether the telasoft module is linted somewhere?

It is probably caused by pg importing the objects from the C extension with "from _pg import *", so the linter does not know that these objects exist. You can try whether an explicit import of these symbols makes the error message go away. Maybe we can make the "import *" explicit then.

-- Christoph



_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo/pygresql

Reply via email to