Skip to content

'SqliteMetadataStore' object has no attribute 'db' #21277

@mcepl

Description

@mcepl

When running mypy in CI with FreeBSD container (https://builds.sr.ht/~mcepl/job/1737686) I get this error:

+ cd m2crypto
++ readlink -f build/lib.freebsd-15.0-RELEASE-p5-amd64-cpython-311
+ PYTHONPATH=/home/build/m2crypto/build/lib.freebsd-15.0-RELEASE-p5-amd64-cpython-311
+ python3 -m mypy --no-color-output -p M2Crypto
error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.20.0
note: please use --show-traceback to print a traceback when reporting a bug
Exception ignored in: <function SqliteMetadataStore.__del__ at 0x1160822b2020>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/mypy/metastore.py", line 242, in __del__
    self.close()
  File "/usr/local/lib/python3.11/site-packages/mypy/metastore.py", line 236, in close
    if self.db:
       ^^^^^^^
AttributeError: 'SqliteMetadataStore' object has no attribute 'db'

To Reproduce

Your Environment

[mypy]

[mypy-M2Crypto.m2crypto]
# Mypy fails to resolve the relative import of the C-extension
# in the SWIG-generated wrapper file.
disable_error_code = import-not-found
  • Python version used: 3.11 of whatever is the FreeBSD standard (apparently, 3.11.15_2)
  • Operating system and version: FreeBSD/latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions