Zwiki conflicts with my product
I've developed a FS based product, and now I'm preparing the environment to put it in production. After copying the product directory in Zope's Product folder Zope doesn't start anymore, for reasons that frankly I don't understand because it "conflicts" with Zwiki (and I don't use anything from that product). 2005-09-15T12:05:37 ERROR(200) Zope Could not import Products.ZWiki Traceback (most recent call last): File "C:\Program Files\Zope-2.7.7-final\lib\python\OFS\Application.py", line 6 73, in import_product product=__import__(pname, global_dict, global_dict, silly) File "d:\Zope-Instance\Products\ZWiki\__init__.py", line 12, in ? import ZWikiPage, ZWikiWeb, Permissions, Defaults File "d:\Zope-Instance\Products\ZWiki\ZWikiPage.py", line 63, in ? from Regexps import url, bracketedexpr, doublebracketedexpr, \ File "d:\Zope-Instance\Products\ZWiki\Regexps.py", line 93, in ? uppercase_uc = unicode(string.uppercase) UnicodeDecodeError: 'ascii' codec can't decode byte 0x8a in position 26: ordinal not in range(128) Traceback (most recent call last): File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\Startup\run.py", line 50, in ? run() File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\Startup\run.py", line 19, in run start_zope(opts.configroot) File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\Startup\__init__.py", line 52, in start_zope starter.startZope() File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\Startup\__init__.py", line 231, in startZope Zope.startup() File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\__init__.py", line 47, in startup _startup() File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\App\startup.py", line 45, in startup OFS.Application.import_products() File "C:\Program Files\Zope-2.7.7-final\lib\python\OFS\Application.py", line 6 50, in import_products import_product(product_dir, product_name, raise_exc=debug_mode) File "C:\Program Files\Zope-2.7.7-final\lib\python\OFS\Application.py", line 6 73, in import_product product=__import__(pname, global_dict, global_dict, silly) File "d:\Zope-Instance\Products\ZWiki\__init__.py", line 12, in ? import ZWikiPage, ZWikiWeb, Permissions, Defaults File "d:\Zope-Instance\Products\ZWiki\ZWikiPage.py", line 63, in ? from Regexps import url, bracketedexpr, doublebracketedexpr, \ File "d:\Zope-Instance\Products\ZWiki\Regexps.py", line 93, in ? uppercase_uc = unicode(string.uppercase) UnicodeDecodeError: 'ascii' codec can't decode byte 0x8a in position 26: ordinal not in range(128) My product depends on Reportlab and PIL, nothing else, I don't have a clue of what's happening here. If I delete my product, everything's fine. If I delete Zwiki, everything's fine. I've tried various locale settings inside zope.conf, always the same error. Zope 2.7.7 on Windows. Zwiki is 0.41. Suggestions ? TIA, ngw --------------------------------- Yahoo! Messenger: chiamate gratuite in tutto il mondo
Nicholas Wieland wrote at 2005-9-15 12:39 +0200:
... from Regexps import url, bracketedexpr, doublebracketedexpr, \ File "d:\Zope-Instance\Products\ZWiki\Regexps.py", line 93, in ? uppercase_uc = unicode(string.uppercase) UnicodeDecodeError: 'ascii' codec can't decode byte 0x8a in position 26: ordinal not in range(128)
When you set a "locale", then "string.uppercase" may contain non ascii characters -- something "ZWiki" apparently cannot handle -- please file a ZWiki bug report. You can fix this problem locally in your code by providing the correct charset as second argument for "unicode()" in line 93 of "...ZWiki/Regexps.py". -- Dieter
Forwarded to http://zwiki.org/1158 , thanks for the report.
Hi Nicholas, I think use of the encoding argument just failed two lines above that one, and so Dieter's suggestion may not work. In your event log at blather severity, or on the console if you start with zopectl fg -Xdebug-mode=on, you should see: ZWiki... Warning: unicode() LookupError for encoding ___, WikiNames will not use the system locale What is the encoding it reports there ? Is it trying a strange one due to your product setting the locale ? (usually not recommended, incidentally..) It shouldn't crash of course. As a workaround you could try: lang, encoding = None, None at line 79. Feel free to take this to http://zwiki.org/1158 if you like.
participants (3)
-
Dieter Maurer -
Nicholas Wieland -
Simon Michael