Ticket #977 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

[WG][M] Discovery Search 'xq' NameError

Reported by: pjkersha Owned by: cbyrom
Priority: blocker Milestone: portal1
Component: discovery Version:
Keywords: Cc: Charlotte.Pascoe@…

Description

Calum - can you see if you can resolve this? The error Charlotte is getting is in ndg_eXist.search - trace with error duplicated in my sandbox is:

File '/home/pjkersha/workspace/ows_framework/ows_server/ows_server/controllers/discovery.py', line 145 in doText
  scope=scope,dateRange=dateRange,bbox=bbox,geoSearchType=geoSearch)
File '/home/pjkersha/workspace/exist/trunk/python/ndgUtils/eXistInterface.py', line 90 in search
  xquery={'ndg_B_metadata':xq.molesSearchSummary,'NumSim':xq.numsimSummary}[target]
NameError: global name 'xq' is not defined

I'm guessing xq needs to be referenced self.xq? Code snippet from ndgUtils/eXistInterface.py:

    def search(self,term,start=1,howmany=20,target=None,scope=None,bbox=None,dateRange=None,geoSearchType=None):
        ''' Provides a search interface that mimics the WSDL search interface, except that
        the target used is the exist collection name, and scope, bbox and dateRange are ignored,
        and a python summary object is returned '''
        xquery={'ndg_B_metadata':xq.molesSearchSummary,'NumSim':xq.numsimSummary}[target]

To replicate,

Change History

comment:1 Changed 11 years ago by cbyrom

  • Status changed from new to closed
  • Resolution set to fixed

Fixed, deployed + tested on ndgbeta deployment. Fix involved:

add missing code to allow numsim/browse quick searches on ndg portal - in eXistInterface.py + fix problem with short_results.kid template to ensure results display properly + add setting up docs to help set up the ows_server app

Note: See TracTickets for help on using tickets.