NameError raised when loading a big-endian wkb
lovasoa opened this issue · comments
Ophir LOJKINE commented
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
Ophir LOJKINE commented
Maybe a static type checker should be added to this project to catch this kind of errors during development.