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

Problem with shapefile sans .sld upload to geonode #181

Open
uniomni opened this issue Nov 29, 2011 · 1 comment
Open

Problem with shapefile sans .sld upload to geonode #181

uniomni opened this issue Nov 29, 2011 · 1 comment

Comments

@uniomni
Copy link
Member

uniomni commented Nov 29, 2011

Having problems uploading shape files:

One is this

Traceback (most recent call last):
File "/home/nielso/dev/riab_env/bin/risiko-upload", line 7, in
execfile(file)
File "/home/nielso/dev/riab/scripts/risiko-upload", line 34, in
check_metadata=True)
File "/home/nielso/dev/riab/impact/storage/io.py", line 1005, in save_to_geonode
ignore=ignore)
File "/home/nielso/dev/riab/impact/storage/io.py", line 852, in save_file_to_geonode
overwrite=overwrite)
File "/home/nielso/dev/geonode/src/GeoNodePy/geonode/maps/utils.py", line 571, in file_upload
new_layer = save(layer, filename, theuser, overwrite, workspace=workspace, keywords=keywords)
File "/home/nielso/dev/geonode/src/GeoNodePy/geonode/maps/utils.py", line 397, in save
sld = get_sld_for(publishing)
File "/home/nielso/dev/geonode/src/GeoNodePy/geonode/maps/gs_helpers.py", line 101, in get_sld_for
if layer.default_style is not None:
File "/home/nielso/dev/riab_env/src/gsconfig.py/src/geoserver/layer.py", line 89, in _get_default_style
name = self.dom.find("defaultStyle/name").text
AttributeError: 'NoneType' object has no attribute 'text'

Another is this
Traceback (most recent call last):
File "/home/nielso/dev/riab_env/bin/risiko-upload", line 7, in
execfile(file)
File "/home/nielso/dev/riab/scripts/risiko-upload", line 34, in
check_metadata=True)
File "/home/nielso/dev/riab/impact/storage/io.py", line 1005, in save_to_geonode
ignore=ignore)
File "/home/nielso/dev/riab/impact/storage/io.py", line 852, in save_file_to_geonode
overwrite=overwrite)
File "/home/nielso/dev/geonode/src/GeoNodePy/geonode/maps/utils.py", line 571, in file_upload
new_layer = save(layer, filename, theuser, overwrite, workspace=workspace, keywords=keywords)
File "/home/nielso/dev/geonode/src/GeoNodePy/geonode/maps/utils.py", line 482, in save
saved_layer.verify()
File "/home/nielso/dev/geonode/src/GeoNodePy/geonode/maps/models.py", line 797, in verify
get_wms()
File "/home/nielso/dev/geonode/src/GeoNodePy/geonode/maps/models.py", line 553, in get_wms
_wms = WebMapService(wms_url, xml=body)
File "/home/nielso/dev/riab_env/src/owslib/owslib/wms.py", line 74, in init
self._capabilities = reader.readString(xml)
File "/home/nielso/dev/riab_env/src/owslib/owslib/wms.py", line 550, in readString
return etree.fromstring(st)
File "/usr/lib/python2.6/xml/etree/ElementTree.py", line 964, in XML
return parser.close()
File "/usr/lib/python2.6/xml/etree/ElementTree.py", line 1254, in close
self._parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: unclosed token: line 5087, column 8

@ghost ghost assigned ingenieroariel Nov 29, 2011
@uniomni
Copy link
Member Author

uniomni commented Nov 29, 2011

The problem went away after a cleanout and restart of geonode. However, it'd be worthwhile catching these kind of errors higher up in the food chain. For example if self.dom.find("defaultStyle/name") is None it'd better to produce information in gsconfig. py about what could have caused that condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants