Closed zepto-ani closed 1 year ago
Sqlite3 is part of the python standard library, but there are a few rare situations where it's explicitly disabled. It looks like you're running on EC2, which I've never seen do that before. What instance type and AMI are you using?
Anyway, to accommodate this in pyrate-limiter, the sqlite3 import could be moved to function scope instead of module scope.
Closed due to inactivity
File "/home/ec2-user/.cache/pypoetry/virtualenvs/app-5tQquC-A-py3.9/lib/python3.9/site-packages/pyrate_limiter/init.py", line 9, in
from .sqlite_bucket import
File "/home/ec2-user/.cache/pypoetry/virtualenvs/app-5tQquC-A-py3.9/lib/python3.9/site-packages/pyrate_limiter/sqlite_bucket.py", line 1, in
import sqlite3
File "/home/ec2-user/.cache/pypoetry/virtualenvs/app-5tQquC-A-py3.9/lib/python3.9/site-packages/newrelic/api/import_hook.py", line 173, in exec_module
self.loader.exec_module(module)
File "/usr/local/lib/python3.9/sqlite3/init.py", line 23, in
from sqlite3.dbapi2 import
File "/home/ec2-user/.cache/pypoetry/virtualenvs/app-5tQquC-A-py3.9/lib/python3.9/site-packages/newrelic/api/import_hook.py", line 173, in exec_module
self.loader.exec_module(module)
File "/usr/local/lib/python3.9/sqlite3/dbapi2.py", line 27, in
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'