geonode icon indicating copy to clipboard operation
geonode copied to clipboard

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

Open jaywhy13 opened this issue 14 years ago • 5 comments

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'

jaywhy13 avatar Jul 05 '12 17:07 jaywhy13

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

ingenieroariel avatar Jul 05 '12 19:07 ingenieroariel

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

jaywhy13 avatar Jul 05 '12 22:07 jaywhy13

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

ingenieroariel avatar Jul 23 '12 16:07 ingenieroariel

Can we close this now?

jj0hns0n avatar Jul 27 '12 17:07 jj0hns0n

Yes.

ingenieroariel avatar Jul 28 '12 02:07 ingenieroariel