"Internal Server Error" upon Index creation
Opened this issue · 1 comments
jugmac00 commented
- fresh Zope install
- create Catalog
- create ZCTextIndex (it shows a note "You must create a ZCTextIndex Lexicon first.")
- click add
Internal Server Error
The server encountered an unexpected internal server error
(generated by waitress)
stacktrace
2019-11-07 19:04:58 ERROR [Zope.SiteErrorLog:251][waitress] 1573149898.23523620.7471558915615186 http://localhost:8080/some_catalog/manage_addProduct/ZCTextIndex/manage_addZCTextIndex
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 151, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 333, in publish_module
Module ZPublisher.WSGIPublisher, line 251, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 57, in call_object
Module Products.ZCTextIndex.ZCTextIndex, line 285, in manage_addZCTextIndex
Module Products.ZCatalog.ZCatalog, line 368, in manage_addIndex
Module Products.ZCatalog.ZCatalog, line 857, in addIndex
Module Products.ZCTextIndex.ZCTextIndex, line 95, in __init__
LookupError: Lexicon "" not found
2019-11-07 19:04:58 ERROR [waitress:363][waitress] Exception while serving /some_catalog/manage_addProduct/ZCTextIndex/manage_addZCTextIndex
Traceback (most recent call last):
File "/home/jugmac00/Tests/Zope/eggs/waitress-1.3.1-py3.6.egg/waitress/channel.py", line 356, in service
task.service()
File "/home/jugmac00/Tests/Zope/eggs/waitress-1.3.1-py3.6.egg/waitress/task.py", line 172, in service
self.execute()
File "/home/jugmac00/Tests/Zope/eggs/waitress-1.3.1-py3.6.egg/waitress/task.py", line 440, in execute
app_iter = self.channel.server.application(environ, start_response)
File "/home/jugmac00/Tests/Zope/src/ZPublisher/httpexceptions.py", line 30, in __call__
return self.application(environ, start_response)
File "/home/jugmac00/Tests/Zope/eggs/Paste-3.1.1-py3.6.egg/paste/translogger.py", line 69, in __call__
return self.application(environ, replacement_start_response)
File "/home/jugmac00/Tests/Zope/src/ZPublisher/WSGIPublisher.py", line 333, in publish_module
response = _publish(request, new_mod_info)
File "/home/jugmac00/Tests/Zope/src/ZPublisher/WSGIPublisher.py", line 251, in publish
bind=1)
File "/home/jugmac00/Tests/Zope/src/ZPublisher/mapply.py", line 85, in mapply
return debug(object, args, context)
File "/home/jugmac00/Tests/Zope/src/ZPublisher/WSGIPublisher.py", line 57, in call_object
return obj(*args)
File "/home/jugmac00/Tests/Zope/eggs/Products.ZCatalog-5.0.1-py3.6.egg/Products/ZCTextIndex/ZCTextIndex.py", line 285, in manage_addZCTextIndex
REQUEST, RESPONSE, URL3)
File "/home/jugmac00/Tests/Zope/eggs/Products.ZCatalog-5.0.1-py3.6.egg/Products/ZCatalog/ZCatalog.py", line 368, in manage_addIndex
self.addIndex(name, type, extra)
File "/home/jugmac00/Tests/Zope/eggs/Products.ZCatalog-5.0.1-py3.6.egg/Products/ZCatalog/ZCatalog.py", line 857, in addIndex
index = base(name, extra=extra, caller=self)
File "/home/jugmac00/Tests/Zope/eggs/Products.ZCatalog-5.0.1-py3.6.egg/Products/ZCTextIndex/ZCTextIndex.py", line 95, in __init__
raise LookupError('Lexicon "%s" not found' % escape(lexicon_id))
LookupError: Lexicon "" not found
There should be no uncaught exception, but a friendly message that well - you have to create and choose a ZCTextIndex Lexicon first.
d-maurer commented
Jürgen Gmach wrote at 2019-11-7 10:10 -0800:
- fresh Zope install
- create Catalog
- create ZCTextIndex (it shows a note "You must create a ZCTextIndex Lexicon first.")
- click add
...
2019-11-07 19:04:58 ERROR [Zope.SiteErrorLog:251][waitress] 1573149898.23523620.7471558915615186 http://localhost:8080/some_catalog/manage_addProduct/ZCTextIndex/manage_addZCTextIndex
Traceback (innermost last):
...
LookupError: Lexicon "" not found
...
There should be no uncaught exception, but a friendly message that well - you have to create and choose a ZCTextIndex Lexicon first.
For me, the "LookupError" together with the note ("create lexicon first")
is sufficient: adding indexes is an advanced operation; people doing
that likely can read tracebacks.