[GeoNode-users] ArcGIS Rest Remote Services

Michael Fedak mikefedak at gmail.com
Thu Sep 13 07:30:21 PDT 2018


Hello,

I have been trying to add ArcGIS Rest resources to a deployment of 2.7.0.

I have not found any documentation on the use of this feature but have
managed to add a mapserver as well as a featureserver as remote services
but cannot import any resources. The interface displays the following
messages:

> no resources can be imported
>
and

> Cannot Parse Any Resource At This Time!
>
Stdout has the following message:

>
> Internal Server Error: /services/3/harvest
Traceback (most recent call last):
  File
"/home/mike/.virtualenvs/geonode/local/lib/python2.7/site-packages/django/core/handlers/exception.py",
line 41, in inner
    response = get_response(request)
  File
"/home/mike/.virtualenvs/geonode/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 249, in _legacy_get_response
    response = self._get_response(request)
  File
"/home/mike/.virtualenvs/geonode/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File
"/home/mike/.virtualenvs/geonode/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File
"/home/mike/.virtualenvs/geonode/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py",
line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/home/mike/geonode/geonode/services/views.py", line 175, in
harvest_resources
    for id in _gen_harvestable_ids(requested, available_resources):
  File "/home/mike/geonode/geonode/services/views.py", line 233, in
_gen_harvestable_ids
    available_resource_ids = [str(r.id) for r in available_resources]
TypeError: 'NoneType' object is not iterable
"POST /services/3/harvest HTTP/1.1" 500 135313
Traceback (most recent call last):
  File "/home/mike/geonode/geonode/services/serviceprocessors/arcgis.py",
line 207, in has_resources
    return True if len(self.parsed_service.layers) > 0 else False
  File
"/home/mike/.virtualenvs/geonode/local/lib/python2.7/site-packages/arcrest/server.py",
line 1008, in layers
    for layer in self._json_struct['layers']]
KeyError: 'layers'

I am guessing that the issue is the arcrest python package that is being
used to harvest layers from the rest services. That package has been
superseded by the ArcGIS API for Python:
https://github.com/Esri/arcgis-python-api

I was wondering if anyone had attempted to replace the arcrest package with
the new API?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20180913/fd350d90/attachment.html>


More information about the geonode-users mailing list