yannforget / pylandsat

Search, download, and preprocess Landsat imagery 🛰️
MIT License
65 stars 18 forks source link

Error: conn.execute("SELECT load_extension('mod_spatialite');") OperationalError: The specified module could not be found. #11

Open rrsc1234 opened 3 years ago

rrsc1234 commented 3 years ago

Hi. I am trying to the run the following script:

from datetime import datetime

from shapely.geometry import Point
from pylandsat import Catalog, Product

catalog = Catalog()

begin = datetime(2010, 1, 1)
end = datetime(2021, 5, 31)
geom = Point(21.78, 79.52)

# Results are returned as a list
scenes = catalog.search(
    begin=begin,
    end=end,
    geom=geom,
    sensors=['LE07', 'LC08']
)

After running the above script I am getting following error:


File "C:\Users\user1\Anaconda3\lib\site-packages\pylandsat\database.py", line 71, in connect
conn.execute("SELECT load_extension('mod_spatialite');")  OperationalError: The specified module could not be found.

Can someone let me know how to resolve this issue.

trexbatman commented 3 years ago

I am having the exactly same issue.

MuhammadAsim1214 commented 3 years ago

same issue

MuhammadAsim1214 commented 3 years ago

Hi. I am trying to the run the following script:

from datetime import datetime

from shapely.geometry import Point
from pylandsat import Catalog, Product

catalog = Catalog()

begin = datetime(2010, 1, 1)
end = datetime(2021, 5, 31)
geom = Point(21.78, 79.52)

# Results are returned as a list
scenes = catalog.search(
    begin=begin,
    end=end,
    geom=geom,
    sensors=['LE07', 'LC08']
)

After running the above script I am getting following error:


File "C:\Users\user1\Anaconda3\lib\site-packages\pylandsat\database.py", line 71, in connect
conn.execute("SELECT load_extension('mod_spatialite');")  OperationalError: The specified module could not be found.

Can someone let me know how to resolve this issue.

Have yu found the solution?

relativityhd commented 8 months ago

I just answered that also here https://github.com/yannforget/pylandsat/issues/3#issuecomment-1973051207

You need to install a library with your systems package manager. For Ubuntu it was:

sudo apt update
sudo apt upgrade
sudo apt install libsqlite3-mod-spatialite