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

NameError raised when loading a big-endian wkb #2

Closed
lovasoa opened this issue Feb 18, 2020 · 1 comment
Closed

NameError raised when loading a big-endian wkb #2

lovasoa opened this issue Feb 18, 2020 · 1 comment

Comments

@lovasoa
Copy link
Contributor

lovasoa commented Feb 18, 2020

While working on #1, I found a bug in the existing code: https://github.com/bosth/plpygis/blob/master/plpygis/geometry.py#L194-L195

Reader should be HexReader.

This can be triggered with

Geometry("000000000100000000000000000000000000000000")

which raises

Error
Traceback (most recent call last):
...
  File ".../plpygis/plpygis/geometry.py", line 195, in _from_wkb
    reader = Reader(wkb, ">")  # big-endian reader
NameError: name 'Reader' is not defined
@lovasoa
Copy link
Contributor Author

lovasoa commented Feb 18, 2020

Maybe a static type checker should be added to this project to catch this kind of errors during development.

@bosth bosth closed this as completed in 659b5ae Feb 21, 2020
bosth added a commit that referenced this issue Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant