Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] IndexError: list index out of range when running lonboard CLI on gpkg file #433

Closed
robintw opened this issue Mar 22, 2024 · 2 comments · Fixed by #434
Closed

[BUG] IndexError: list index out of range when running lonboard CLI on gpkg file #433

robintw opened this issue Mar 22, 2024 · 2 comments · Fixed by #434
Labels
bug Something isn't working

Comments

@robintw
Copy link

robintw commented Mar 22, 2024

Context

I'm running the lonboard CLI on a GeoPackage file as follows:

lonboard West_Devon_rail.gpkg

Resulting behaviour, error message or logs

I get the following output:

Traceback (most recent call last):
  File "/Users/robin/mambaforge/envs/biosouth/bin/lonboard", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/robin/mambaforge/envs/biosouth/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robin/mambaforge/envs/biosouth/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/robin/mambaforge/envs/biosouth/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robin/mambaforge/envs/biosouth/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/robin/mambaforge/envs/biosouth/lib/python3.12/site-packages/lonboard/_cli.py", line 121, in main
    table = read_pyogrio(path)
            ^^^^^^^^^^^^^^^^^^
  File "/Users/robin/mambaforge/envs/biosouth/lib/python3.12/site-packages/lonboard/_cli.py", line 33, in read_pyogrio
    geometry_column_index = [
                            ^
IndexError: list index out of range

Environment

  • OS: MacOS 12.7.3
  • Browser: Chrome (but it crashes before it gets to the browser)
  • Lonboard Version: 0.7.0

Steps to reproduce the bug

  1. Download West_Devon_rail.gpkg from https://automaticknowledge.org/gb/rail/West_Devon_rail.gpkg
  2. Run lonboard West_Devon_rail.gpkg
@robintw robintw added the bug Something isn't working label Mar 22, 2024
kylebarron added a commit that referenced this issue Mar 23, 2024
Apparently the returned column name is not _always_ `"wkb_geometry"`.
Closes #433
@kylebarron
Copy link
Member

Thanks for the report! This should be fixed in 0.7.1

@robintw
Copy link
Author

robintw commented Mar 23, 2024

Wonderful, thanks for the very prompt fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants