GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.45k stars 1.13k forks source link

Unexpected error during upload: 'NoneType' object has no attribute of type text #314

Closed jaywhy13 closed 12 years ago

jaywhy13 commented 12 years ago

This error was experienced uploading a layer with projection "WGS_1984_UTM_Zone_20N". User should get a better error if it is that the projection is not being accepted.

[Thu Jul 05 10:45:57 2012] [error] AttributeError: 'NoneType' object has no attribute 'text' [Thu Jul 05 10:48:29 2012] [error] Unexpected error during upload. [Thu Jul 05 10:48:29 2012] [error] Traceback (most recent call last): [Thu Jul 05 10:48:29 2012] [error] File "/var/lib/geonode/src/GeoNodePy/geonode/maps/views.py", line 840, in upload_layer [Thu Jul 05 10:48:29 2012] [error] permissions = form.cleaned_data["permissions"] [Thu Jul 05 10:48:29 2012] [error] File "/var/lib/geonode/src/GeoNodePy/geonode/maps/utils.py", line 386, in save [Thu Jul 05 10:48:29 2012] [error] sld = get_sld_for(publishing) [Thu Jul 05 10:48:29 2012] [error] File "/var/lib/geonode/src/GeoNodePy/geonode/maps/gs_helpers.py", line 106, in get_sld_for [Thu Jul 05 10:48:29 2012] [error] name = layer.default_style.name if layer.default_style is not None else "point" [Thu Jul 05 10:48:29 2012] [error] File "/var/lib/geonode/lib/python2.7/site-packages/geoserver/layer.py", line 89, in _get_default_style [Thu Jul 05 10:48:29 2012] [error] name = self.dom.find("defaultStyle/name").text [Thu Jul 05 10:48:29 2012] [error] AttributeError: 'NoneType' object has no attribute 'text'

ingenieroariel commented 12 years ago

Here is the fix:

https://github.com/dwins/gsconfig.py/pull/27

It requires a new gsconfig release, I will make sure it happens before our next release towards 1.2

jaywhy13 commented 12 years ago

Thanks, patched it in.. will try uploading again.

ingenieroariel commented 12 years ago

Gsconfig has already been released (0.5.5) master can switch to it.

jj0hns0n commented 12 years ago

Can we close this now?

ingenieroariel commented 12 years ago

Yes.