Skip to main content

Posts

Showing posts with the label spatialite

My First GitHub Pull Request; Datasette Windows and Spatialite

 I made my first ever pull request on GitHub this morning! The gang and I still mostly develop code on Windows boxes. It has more to do with the machines we have available to us on any given day than anything else. (The just-sit-down-and-type machine in our house is also for playing video games, so... Windows.) This has led to issues when using our Datasette enabled QSO logger and mapping applications .  Datasette on Windows has an issue with finding the SpatiaLite DLL file. The gang and I worked through the issues and documented our really clunky, blunt force, fix . The fix, however, amounted to changing the source code of Datasette itself on a per installation basis. That meant that if I moved to a new Windows machine I had to find the fix and re-implement it. Even worse, that meant that if I wanted to try something that worked only in a newer version of Datasette, I also had to reimplement the fix. That... Was a Lot. So, I was totally psyched when I got a little bit of ti...

Things I Learned: Adding new DLL locations to Windows via the PATH Envrionment Variable

 This is a note for myself for later when I try to construct a better set of instructions for adding Spatialite to Windows for use with Datasette . You can instruct Windows to look for DLLs in a new directory simply by adding that directory to your PATH envrionment variable via  set PATH=C:\path to your dll;%PATH% via .

Things I Learned... Again: Spatialite with Datasette on Windows

 I'm mostly writing this so that the next time I run into this, I'll have a handy set of notes. Many months ago, I found out that Datasette on Windows doesn't like this :             for extension in self.sqlite_extensions:                 # "extension" is either a string path to the extension                  or a 2-item tuple that specifies which entrypoint to load.                 if isinstance(extension, tuple):                     path, entrypoint = extension                     conn.execute("SELECT load_extension(?, ?)", [path, entrypoint])                 else:                     conn.execute("SELECT load_extension(?)", [extension]) in...