Geometry Error while adding resource

168 views
Skip to first unread message

Kaleb Clark

unread,
Dec 7, 2013, 2:10:24 PM12/7/13
to opendataca...@googlegroups.com
Good Morning,

I am working on a deployment for the Sacramento CfA brigade. I have had success getting CSW & ODC running but now running into an error trying to create a resource.

Error: "Exception Value: Could not create geometry because of errors while reading input."

I the WKT geometry field is blank. The sample resource I was adding did not contain any geometries.

The error is preventing any resource at all from being added.

I also notice that these fields are in the suggestion form as well. When i look at Philly's implementation, these fields are not in the suggestion form. Is there a configuration method to disable the WKT geometries?

Thanks,
-Kaleb Clark
-Code4Sac

Mark Headd

unread,
Dec 9, 2013, 12:21:16 PM12/9/13
to opendataca...@googlegroups.com
Kaleb,

If you haven't worked past your error, you might try posting it to the issues list in ht eODC Github repo.


The Philly implementation may be running an older version of ODC, so if you are using the latest code there may be enhancements not reflected in the Philly site.


--
You received this message because you are subscribed to the Google Groups "opendatacatalog-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatacatalog-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Adam Hinz

unread,
Dec 9, 2013, 12:50:44 PM12/9/13
to opendataca...@googlegroups.com
Nothing comes to mind directly - could you set DEBUG=True and post the
stack trace?

-Adam

On 12/09, Mark Headd wrote:
> Kaleb,
>
> If you haven't worked past your error, you might try posting it to the
> issues list in ht eODC Github repo.
>
> https://github.com/azavea/Open-Data-Catalog/issues
>
> The Philly implementation may be running an older version of ODC, so if you
> are using the latest code there may be enhancements not reflected in the
> Philly site.
>
>
> On Sat, Dec 7, 2013 at 2:10 PM, Kaleb Clark <ka...@codeforsacramento.org>wrote:
>
> > Good Morning,
> >
> > I am working on a deployment for the Sacramento CfA brigade. I have had
> > success getting CSW & ODC running but now running into an error trying to
> > create a resource.
> >
> > *Error*: "Exception Value: Could not create geometry because of errors
> > while reading input."
> >
> > I the WKT geometry field is blank. The sample resource I was adding did
> > not contain any geometries.
> >
> > The error is preventing any resource at all from being added.
> >
> > I also notice that these fields are in the suggestion form as well. When i
> > look at Philly's implementation, these fields are not in the suggestion
> > form. Is there a configuration method to disable the WKT geometries?
> >
> > Thanks,
> > -Kaleb Clark
> > -Code4Sac
> >
> >
>
>
>

--

Adam Hinz
Software Engineer, Azavea
ad...@adamhinz.com | c: 608-445-8391 | Twitter: @ahinz

Kaleb Clark

unread,
Dec 9, 2013, 1:48:15 PM12/9/13
to opendataca...@googlegroups.com
Adam, thanks for responding. Here is the stack trace.
I am getting this whenever I am trying to add a resource from the admin page. 

Thanks,
-Kaleb Clark
-Code4Sac

ReadingError at /_admin_/opendata/resource/add/

Could not create geometry because of errors while reading input.
Request Method: POST
Request URL: http://leaflr.com:8080/_admin_/opendata/resource/add/
Django Version:1.5.1
Exception Type:ReadingError
Exception Value:
Could not create geometry because of errors while reading input.
Exception Location: /var/python/odc/local/lib/python2.7/site-packages/shapely/geometry/base.py in geom_from_wkt, line 55
Python Executable:/var/python/odc/bin/python
Python Version:2.7.3
Python Path:
['/var/python/odc/Open-Data-Catalog/OpenDataCatalog',
 '/var/python/odc/Open-Data-Catalog',
 '/var/python/odc/bin',
 '/var/python/odc/lib/python2.7',
 '/var/python/odc/lib/python2.7/plat-linux2',
 '/var/python/odc/lib/python2.7/lib-tk',
 '/var/python/odc/lib/python2.7/lib-old',
 '/var/python/odc/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/var/python/odc/local/lib/python2.7/site-packages',
 '/var/python/odc/local/lib/python2.7/site-packages/PIL']
Server time:Mon, 9 Dec 2013 13:44:26 -0500


Environment:


Request Method: POST

Django Version: 1.5.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.comments',
 'django.contrib.flatpages',
 'django.contrib.sitemaps',
 'django.contrib.humanize',
 'south',
 'OpenDataCatalog.opendata',
 'registration',
 'sorl.thumbnail',
 'pagination',
 'django_sorting',
 'djangoratings',
 'OpenDataCatalog.comments',
 'OpenDataCatalog.suggestions',
 'OpenDataCatalog.contest',
 'OpenDataCatalog.catalog')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django_sorting.middleware.SortingMiddleware',
 'pagination.middleware.PaginationMiddleware')


Traceback:
File "/var/python/odc/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  372.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  202.             return view(request, *args, **kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/var/python/odc/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
  223.                 return func(*args, **kwargs)
File "/var/python/odc/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
  1007.                 self.save_model(request, new_object, form, False)
File "/var/python/odc/Open-Data-Catalog/OpenDataCatalog/opendata/admin.py" in save_model
  49.         obj.save()
File "/var/python/odc/Open-Data-Catalog/OpenDataCatalog/opendata/models.py" in save
  80.         self.csw_xml = self.gen_csw_xml()
File "/var/python/odc/Open-Data-Catalog/OpenDataCatalog/opendata/models.py" in gen_csw_xml
  244.         geom = loads(self.wkt_geometry)
File "/var/python/odc/local/lib/python2.7/site-packages/shapely/wkt.py" in loads
  10.     return geom_from_wkt(data) #factory(geom)
File "/var/python/odc/local/lib/python2.7/site-packages/shapely/geometry/base.py" in geom_from_wkt
  55.         "Could not create geometry because of errors while reading input."

Exception Type: ReadingError at /_admin_/opendata/resource/add/
Exception Value: Could not create geometry because of errors while reading input.


And the POST data:

VariableValue
url_set-TOTAL_FORMS
u'1'
url_set-0-url_type
u'1'
update_frequency
u''
_continue
u'Save and continue editing'
url_set-0-id
u''
wkt_geometry
u''
url_set-MAX_NUM_FORMS
u'1000'
url_set-__prefix__-url_label
u''
contact_url
u''
usage
u'Usage'
csrfmiddlewaretoken
u'ctIouy7zOMyl60KdC5Cu7uFXgBH9sTLi'
contact_phone
u'333-222-1010'
url_set-__prefix__-url_type
u''
url_set-__prefix__-url
u''
url_set-0-url
u'http://code4sac.org'
division
u'div'
description
u'Resource Desc'
url_set-0-resource
u''
data_formats
u''
url_set-__prefix__-resource
u''
short_description
u'Short Des'
area_of_interest
u''
contact_email
u'f...@bar.org'
updates
u''
metadata_notes
u''
time_period
u''
url_set-0-url_label
u'Code4Sac'
url_set-INITIAL_FORMS
u'0'
name
u'Resource name'
release_date
u'2013-12-09'
url_set-__prefix__-id
u''
proj_coord_sys
u''
organization
u'Org'
metadata_contact
u''
is_published
u'on'


--
You received this message because you are subscribed to a topic in the Google Groups "opendatacatalog-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opendatacatalog-user/FM8a05P9CEM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opendatacatalog-...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
-Kaleb Clark
-Code for Sacramento
-codeforsacramento.org
-916.668.0CFS(0237)

Adam Hinz

unread,
Dec 9, 2013, 3:40:20 PM12/9/13
to opendataca...@googlegroups.com
Hey,

The issue was with some of the pycsw integration. I've patched it up
(https://github.com/azavea/Open-Data-Catalog/commit/b84adac0cd6a232ca8fa548c548ae693f056ac87)
and you should be all set.

-Adam

On 12/09, Kaleb Clark wrote:
> Adam, thanks for responding. Here is the stack trace.
> I am getting this whenever I am trying to add a resource from the admin
> page.
>
> Thanks,
> -Kaleb Clark
> -Code4Sac
>
> ReadingError at /_admin_/opendata/resource/add/
>
> Could not create geometry because of errors while reading input.
>
> Request Method:POSTRequest URL:
> http://leaflr.com:8080/_admin_/opendata/resource/add/Django
> Version:1.5.1Exception
> Type:ReadingErrorException Value:
>
> Could not create geometry because of errors while reading input.
>
> Exception Location:/var/python/odc/local/lib/python2.7/site-packages/shapely/geometry/base.py
> in geom_from_wkt, line 55Python Executable:/var/python/odc/bin/pythonPython
> Version:2.7.3Python Path:

Kaleb Clark

unread,
Dec 9, 2013, 4:40:41 PM12/9/13
to opendataca...@googlegroups.com
Adam, 

That worked, Thanks for being so responsive on this. Good stuff!

Thanks,
-Kaleb Clark
-Code4Sac


--
You received this message because you are subscribed to a topic in the Google Groups "opendatacatalog-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opendatacatalog-user/FM8a05P9CEM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opendatacatalog-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages