Submitted by : 127.0.0.1 at: 2004-11-02T00:41:26+00:00 (13 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

/Control_Panel/Products/ZWiki text:

Traceback (most recent call last):
 File "/opt/zope/lib/python/OFS/Application.py", line 660, in import_product
   product=__import__(pname, global_dict, global_dict, silly)
 File "/var/opt/zope/default/Products/ZWiki/__init__.py", line 10, in ?
   import ZWikiPage, ZWikiWeb, Permissions, Defaults
 File "/var/opt/zope/default/Products/ZWiki/ZWikiPage.py", line 76, in ?
   from Admin import AdminSupport
 File "/var/opt/zope/default/Products/ZWiki/Admin.py", line 18, in ?
   from pagetypes import PAGE_TYPE_UPGRADES
 File "/var/opt/zope/default/Products/ZWiki/pagetypes/__init__.py", line 129, in ?
   __import__('Products.ZWiki.pagetypes.%s' % file)
 File "/var/opt/zope/default/Products/ZWiki/pagetypes/moin.py", line 11, in ?
   from moin_support import render_moin_markup
 File "/var/opt/zope/default/Products/ZWiki/pagetypes/moin_support.py", line 29, in ?
   class Parser:
 File "/var/opt/zope/default/Products/ZWiki/pagetypes/moin_support.py", line 53, in Parser
   word_rule = ur'(?:(?<[%(l)s])|^)%(parent)s(?:%(subpages)s(?:[%(u)s][%(l)s]+){2,})+(?[%(u)s%(l)s]+)' % {
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb5 in position 26: ordinal not in range(128)

property change --simon, Tue, 09 Nov 2004 02:30:40 -0800 reply

Category: general => admin-installingupgrading Severity: normal => serious

... --simon, Tue, 09 Nov 2004 02:56:19 -0800 reply

Thanks.. could you run python at the command line and tell me what this prints:

>>> import locale
>>> locale.getdefaultlocale()

and:

>>> import string
>>> string.uppercase, string.lowercase

Also could you replace moin_support.py lines 54-55 with these:

'u': unicode(string.uppercase,'utf-8'), #config.chars_upper,
'l': unicode(string.lowercase,'utf-8'), #config.chars_lower,

and see if that fixes it. If all else fails, remove the two moin files from that directory to allow startup to proceed.

... --Bob McElrath?, Tue, 09 Nov 2004 08:11:00 -0800 reply

I am using 0.36 on linux with zope 2.7.2 and don't see this problem. My locale is (None,None).

Your questions --Fri, 12 Nov 2004 02:58:33 -0800 reply

Here are the answers to your questions.

Question 1

Python 2.3.3 (#1, Apr  6 2004, 01:47:39)
[GCC 3.3.3 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
['de_DE', 'utf']

Question 2

>>> import string
>>> string.uppercase, string.lowercase
('ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')

Question 3, "Also could you replace moin_support.py lines 54-55 with these".

I did it and now it works :-)

Thanks

Sorry I was too fast --Fri, 12 Nov 2004 03:03:23 -0800 reply

I can start zope now but the ZWiki product in the Product folders is shown as broken product.

The traceback is (I hope I get it formatted well now):

File "/opt/zope/lib/python/OFS/Application.py", line 660, in import_product
  product=__import__(pname, global_dict, global_dict, silly)
File "/var/opt/zope/default/Products/ZWiki/__init__.py", line 10, in ?
  import ZWikiPage, ZWikiWeb, Permissions, Defaults
File "/var/opt/zope/default/Products/ZWiki/ZWikiPage.py", line 76, in ?
  from Admin import AdminSupport
File "/var/opt/zope/default/Products/ZWiki/Admin.py", line 18, in ?
  from pagetypes import PAGE_TYPE_UPGRADES
File "/var/opt/zope/default/Products/ZWiki/pagetypes/__init__.py", line 129, in ?
  __import__('Products.ZWiki.pagetypes.%s' % file)
File "/var/opt/zope/default/Products/ZWiki/pagetypes/moin.py", line 11, in ?
  from moin_support import render_moin_markup
File "/var/opt/zope/default/Products/ZWiki/pagetypes/moin_support.py", line 29, in ?
  class Parser:
File "/var/opt/zope/default/Products/ZWiki/pagetypes/moin_support.py", line 53, in Parser
  word_rule = ur'(?:(?<[%(l)s])|^)%(parent)s(?:%(subpages)s(?:[%(u)s][%(l)s]+){2,})+(?[%(u)s%(l)s]+)' % {
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 26-27: invalid data

property change --simon, Sat, 13 Nov 2004 07:59:28 -0800 reply

Name: '#963 zwiki 0.36.0 broken on linux with zope 2.7.2' => '#963 zwiki 0.36.0 UnicodeDecodeError? at startup with certain locales'

I see --simon, Sun, 14 Nov 2004 11:22:56 -0800 reply

The problem is on systems which are configured with a locale and non-utf-8 encoding. I've made moin_support follow the procedure in Zwiki's Regexps.py, please try http://zwiki.org/releases/ZWiki-0.36.1.tgz .

property change --simon, Sun, 14 Nov 2004 11:48:46 -0800 reply

Status: open => closed

Test 0.36.1 --Sun, 14 Nov 2004 23:36:46 -0800 reply

I just installed 0.36.1 and can confirm that it works now :-)

Thanks.

not yet --simon, Tue, 16 Nov 2004 11:36:32 -0800 reply

This isn't right yet. #972 reports:: 'TypeError?: unicode() argument 2 must be string, not None.' at moin_support.py line 62.

... --simon, Tue, 16 Nov 2004 11:45:23 -0800 reply

Please try http://zwiki.org/releases/ZWiki-0.36.2.tgz or pull from darcs.

seems ok --Thu, 18 Nov 2004 00:05:16 -0800 reply

I installed it on my linux machine, up to now I had no problems: