Re: [PyWrapper-devel] Managing the concept server
Status: Alpha
Brought to you by:
jatorre
From: <wi...@go...> - 2006-11-13 16:30:56
|
Milko, comment #1: try not to use :: in the full concepts but make them look like a simple URL. for example http://www.ipgri.org/schemas/mcpd_eurisco/1.00/NICODE comment #2: the error says: "biocase.CNS.NonUniqueConceptError". so it looks as if the aliases or qualified names are not unique. check. another problem could be that the alias.txt should have "=" between an alias and the qualified concept. But I think its not required. commen #3: the idea is that the server CANNOT start up with conflicting or broken alias files. this shoulkd be fixed before. dont you agree with that? otherwise you could get unforseen weird results. markus On 11/13/06, Skofic A. Milko (IPGRI) <M.S...@cg...> wrote: > > Hi guys, I am trying to create an alias file to use other schemas and test > mapping and output models. I have created a schema, run it through TAPIR's > schema parser and tried to set up another concept server. > I get an error whenever I startup TAPIR, and I am sure it has to do with > the alias file and its other related files. > The error is: > > Traceback (most recent call last): > File "../webapp/start_server.py", line 56, in ? > import root, page > File "/Library/WebServer/Services/pywrapper/webapp/root.py", line 17, in > ? > import page, biocase.configuration > File "/Library/WebServer/Services/pywrapper/webapp/page.py", line 24, in > ? > class Page(object): > File "/Library/WebServer/Services/pywrapper/webapp/page.py", line 26, in > Page > _dsaObjDict = biocase.pywrapper.datasource_factory.getDsaDict() > File > "/Library/WebServer/Services/pywrapper/lib/biocase/pywrapper/datasource_factory.py", > line 49, in getDsaDict > dsaObj.readPrefsFile() > File > "/Library/WebServer/Services/pywrapper/lib/biocase/pywrapper/datasource.py", > line 218, in readPrefsFile > parse(filename, handler) > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/site-packages/_xmlplus/sax/__init__.py", > line 31, in parse > parser.parse(filename_or_stream) > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", > line 109, in parse > xmlreader.IncrementalParser.parse(self, source) > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", > line 123, in parse > self.feed(buffer) > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", > line 216, in feed > self._parser.Parse(data, isFinal) > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", > line 312, in start_element > self._cont_handler.startElement(name, AttributesImpl(attrs)) > File > "/Library/WebServer/Services/pywrapper/lib/biocase/pywrapper/datasource_handler.py", > line 73, in startElement > self._lastConceptObj = buildConceptFromAttrs(attrs, > ns=self._lastSchemaNS) > File > "/Library/WebServer/Services/pywrapper/lib/biocase/pywrapper/filter/concept.py", > line 215, in buildConceptFromAttrs > conceptObj = buildConcept(qname, ns) > File > "/Library/WebServer/Services/pywrapper/lib/biocase/pywrapper/filter/concept.py", > line 239, in buildConcept > CNServer = createCNServer(aliasList=cfgObj.ConceptNameServer.AliasList, > cachedir=cfgObj.cacheLocator) > File "/Library/WebServer/Services/pywrapper/lib/biocase/CNS.py", line > 433, in createCNServer > CNS.addAliasLocation(alias) > File "/Library/WebServer/Services/pywrapper/lib/biocase/CNS.py", line > 168, in addAliasLocation > self._read(fh) > File "/Library/WebServer/Services/pywrapper/lib/biocase/CNS.py", line > 241, in _read > self.addConcept( c, additionalAliases=[] ) > File "/Library/WebServer/Services/pywrapper/lib/biocase/CNS.py", line > 346, in addConcept > raise NonUniqueConcept(conceptObj) > biocase.CNS.NonUniqueConceptError in atexit._run_exitfuncs: > Traceback (most recent call last): > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/atexit.py", > line 24, in _run_exitfuncs > func(*targs, **kargs) > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/logging/__init__.py", > line 1333, in shutdown > h.close() > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/logging/__init__.py", > line 674, in close > del _handlers[self] > KeyError: <logging.StreamHandler instance at 0x1385418> > Error in sys.exitfunc: > Traceback (most recent call last): > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/atexit.py", > line 24, in _run_exitfuncs > func(*targs, **kargs) > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/logging/__init__.py", > line 1333, in shutdown > h.close() > File > "/Library/WebServer/Services/pywrapper/tools/python/lib/python2.4/logging/__init__.py", > line 674, in close > del _handlers[self] > KeyError: <logging.StreamHandler instance at 0x1385418> > > This listing comes from the terminal. I am sure I did something wrong with > the files, however it should not crash like this. Anyways here are the > files: > > The alias file is at http://eurisco.ecpgr.org/schemas/alias.txt > The schema file is at: > http://eurisco.ecpgr.org/schemas/MCPD_EURISCO_1.00.xsd > And the model file is at: > http://eurisco.ecpgr.org/schemas/MCPD_EURISCO_1.00.xml > > I have now removed the reference to that alias file so the system can > work. > Looking at the alias file I see a strange syntax: is that correct? I only > changed the label, alias and added the models section. > > Thanks! > > Milko > |