Skip to content

AttributeError: 'sqlite3.Connection' object has no attribute 'enable_load_extension' #7

@medoror

Description

@medoror

As the sqlite database connection attempts to load extensions I am seeing the following failure

Traceback (most recent call last):
  File "/Users/michaeledoror/workspace/web-scraping/.venv/lib/python3.12/site-packages/contentmap/sitemap.py", line 31, in build
    cm = ContentMapCreator(contents, include_vss=self.include_vss)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michaeledoror/workspace/web-scraping/.venv/lib/python3.12/site-packages/contentmap/core.py", line 22, in __init__
    self.connection.enable_load_extension(True)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'sqlite3.Connection' object has no attribute 'enable_load_extension'

I think this is because sqlite3 (coming from my python installation) doesn't have extensions loaded by default.

I attempted to fix this by using this suggestion but this also has not worked for me

Thoughts on what I should be doing to get this work out of the box?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions