karimbahgat / PyCRS

Projection creation, and conversion to misc formats
MIT License
98 stars 20 forks source link

Exception: 'Unknown' object has no attribute 'metermultiplier' #36

Open eykamp opened 5 years ago

eykamp commented 5 years ago

I'm getting an unexpected exception. It's easy to reproduce:

>>> import pycrs
>>> pycrs.__version__
'1.0.0'
>>> crs = pycrs.parse.from_epsg_code(2230)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\eykampC\AppData\Local\Programs\Python\Python37\lib\site-packages\pycrs\parse.py", line 35, in from_epsg_code
    crs = from_proj4(proj4)
  File "C:\Users\eykampC\AppData\Local\Programs\Python\Python37\lib\site-packages\pycrs\parse.py", line 687, in from_proj4
    unit.metermultiplier.value = partdict["+to_meter"]
AttributeError: 'Unknown' object has no attribute 'metermultiplier'
>>>
karimbahgat commented 5 years ago

This is just a simple bug where I changed the name of 'metermultiplier' attribute to 'unitmultiplier', but forgot to change this part of the code. Will include as bugfix in next release.