simonw / datasette-leaflet-geojson

Datasette plugin that replaces any GeoJSON column values with a Leaflet map.
20 stars 8 forks source link

Error when installing #20

Open asitemade4u opened 1 year ago

asitemade4u commented 1 year ago

Hi, I face an error when installing the plugin:

  1. From the console, as a standard user (non root), I execute datasette install datasette-leaflet-geojson
  2. The following error is thrown:
File "/home/stsinc/.local/bin/datasette", line 5, in <module>
    from datasette.cli import cli
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/cli.py", line 17, in <module>
    from .app import (
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/app.py", line 39, in <module>
    from .views.database import database_download, DatabaseView, TableCreateView
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/views/database.py", line 33, in <module>
    from datasette.plugins import pm
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/plugins.py", line 27, in <module>
    pm.load_setuptools_entrypoints("datasette")
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 398, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette_geojson_map/__init__.py", line 5, in <module>
    from datasette_geojson import can_render_geojson
ModuleNotFoundError: No module named 'datasette_geojson'

My hunch is that there is a naming error with a dependency: 'datasette_geojson' instead of 'datasette-geojson'

asitemade4u commented 1 year ago
  1. However the installation goes through with pip install datasette-leaflet-geojson
  2. But then, when I launch Datasette, I get a similar error as above:
 File "/home/stsinc/.local/bin/datasette", line 5, in <module>
    from datasette.cli import cli
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/cli.py", line 17, in <module>
    from .app import (
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/app.py", line 39, in <module>
    from .views.database import database_download, DatabaseView, TableCreateView
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/views/database.py", line 33, in <module>
    from datasette.plugins import pm
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette/plugins.py", line 27, in <module>
    pm.load_setuptools_entrypoints("datasette")
  File "/usr/local/lib/python3.10/dist-packages/pluggy/_manager.py", line 398, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/stsinc/.local/lib/python3.10/site-packages/datasette_geojson_map/__init__.py", line 5, in <module>
    from datasette_geojson import can_render_geojson
ModuleNotFoundError: No module named 'datasette_geojson'

Please help as the plugin is not functional as per now.