[Zope] zope does not start after ZWiki 0.36.1

robert rottermann robert at redcor.ch
Tue Nov 16 06:33:34 EST 2004


I found a solution:
in ZWiki/pagetypes/moin_support.py
I changed the assignment of locales as follows:

import locale
try: lang, encoding = locale.getlocale()
except ValueError: lang, encoding = None, None
if not lang:
     lang, encoding = locale.getdefaultlocale()
...
Robert

robert rottermann wrote:
> After I installed ZWiki 0.36.1
> Zope dies in moin_support
> tracepack follows.
> I use the following locale
>  >>> import locale
>  >>> locale.getdefaultlocale()
> ['en_US', 'utf']
> 
> Robert
> 
> raceback (most recent call last):
>   File "/home/zope/Zope-2.7.3b1-0/lib/python/OFS/Application.py", line 
> 660, in import_product
>     product=__import__(pname, global_dict, global_dict, silly)
>   File "/home/zope/instances/redcor/Products/ZWiki/__init__.py", line 
> 11, in ?
>     import ZWikiPage, ZWikiWeb, Permissions, Defaults
>   File "/home/zope/instances/redcor/Products/ZWiki/ZWikiPage.py", line 
> 76, in ?
>     from Admin import AdminSupport
>   File "/home/zope/instances/redcor/Products/ZWiki/Admin.py", line 18, in ?
>     from pagetypes import PAGE_TYPE_UPGRADES
>   File 
> "/home/zope/instances/redcor/Products/ZWiki/pagetypes/__init__.py", line 
> 132, in ?
>     __import__('Products.ZWiki.pagetypes.%s' % file)
>   File "/home/zope/instances/redcor/Products/ZWiki/pagetypes/moin.py", 
> line 11, in ?
>     from moin_support import render_moin_markup
>   File 
> "/home/zope/instances/redcor/Products/ZWiki/pagetypes/moin_support.py", 
> line 38, in ?
>     class Parser:
>   File 
> "/home/zope/instances/redcor/Products/ZWiki/pagetypes/moin_support.py", 
> line 62, in Parser
>     word_rule = 
> ur'(?:(?<![%(l)s])|^)%(parent)s(?:%(subpages)s(?:[%(u)s][%(l)s]+){2,})+(?![%(u)s%(l)s]+)' 
> % {
> TypeError: unicode() argument 2 must be string, not None
> Traceback (most recent call last):
>   File "/home/zope/Zope/lib/python/Zope/Startup/run.py", line 50, in ?
>     run()
>   File "/home/zope/Zope/lib/python/Zope/Startup/run.py", line 19, in run
>     start_zope(opts.configroot)
>   File "/home/zope/Zope-2.7.3b1-0/lib/python/Zope/Startup/__init__.py", 
> line 51, in start_zope
>     starter.startZope()
>   File "/home/zope/Zope-2.7.3b1-0/lib/python/Zope/Startup/__init__.py", 
> line 230, in startZope
>     Zope.startup()
>   File "/home/zope/Zope-2.7.3b1-0/lib/python/Zope/__init__.py", line 47, 
> in startup
>     _startup()
>   File "/home/zope/Zope-2.7.3b1-0/lib/python/Zope/App/startup.py", line 
> 45, in startup
>     OFS.Application.import_products()
>   File "/home/zope/Zope-2.7.3b1-0/lib/python/OFS/Application.py", line 
> 637, in import_products
>     import_product(product_dir, product_name, raise_exc=debug_mode)
>   File "/home/zope/Zope-2.7.3b1-0/lib/python/OFS/Application.py", line 
> 660, in import_product
>     product=__import__(pname, global_dict, global_dict, silly)
>   File "/home/zope/instances/redcor/Products/ZWiki/__init__.py", line 
> 11, in ?
>     import ZWikiPage, ZWikiWeb, Permissions, Defaults
>   File "/home/zope/instances/redcor/Products/ZWiki/ZWikiPage.py", line 
> 76, in ?
>     from Admin import AdminSupport
>   File "/home/zope/instances/redcor/Products/ZWiki/Admin.py", line 18, in ?
>     from pagetypes import PAGE_TYPE_UPGRADES
>   File 
> "/home/zope/instances/redcor/Products/ZWiki/pagetypes/__init__.py", line 
> 132, in ?
>     __import__('Products.ZWiki.pagetypes.%s' % file)
>   File "/home/zope/instances/redcor/Products/ZWiki/pagetypes/moin.py", 
> line 11, in ?
>     from moin_support import render_moin_markup
>   File 
> "/home/zope/instances/redcor/Products/ZWiki/pagetypes/moin_support.py", 
> line 38, in ?
>     class Parser:
>   File 
> "/home/zope/instances/redcor/Products/ZWiki/pagetypes/moin_support.py", 
> line 62, in Parser
>     word_rule = 
> ur'(?:(?<![%(l)s])|^)%(parent)s(?:%(subpages)s(?:[%(u)s][%(l)s]+){2,})+(?![%(u)s%(l)s]+)' 
> % {
> TypeError: unicode() argument 2 must be string, not None
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
> 
> 


More information about the Zope mailing list