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 ERRR(200) Zope Could not import Products.ZWiki
Traceback (most recent call last):
File "C:\Program Files\Zope-2.7.7-final\lib\python\FS\Application.py", line 6
73, in import_product
productimport__(pname, global_dict, global_dict, silly)
File "d:\Zope-Instance\Products\ZWiki\__initpy", 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\__initpy",
line 52, in start_zope
starter.startZope()
File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\Startup\__initpy",
line 231, in startZope
Zope.startup()
File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\__initpy", line 47,
in startup
_startup()
File "C:\Program Files\Zope-2.7.7-final\lib\python\Zope\App\startup.py", line
45, in startup
FS.Application.import_products()
File "C:\Program Files\Zope-2.7.7-final\lib\python\FS\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\FS\Application.py", line 6
73, in import_product
productimport__(pname, global_dict, global_dict, silly)
File "d:\Zope-Instance\Products\ZWiki\__initpy", 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
Zope maillist - Zope (AT) zope (DOT) org
** No cross posts or HTML encoding! **
(Related lists -
)
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".
dietermaurer | Sun, 04 May 2008 11:09:00 GMT |
Zope maillist - Zope (AT) zope (DOT) org
** No cross posts or HTML encoding! **
(Related lists -
)
simonmichael | Sun, 04 May 2008 11:10:00 GMT |
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.
Zope maillist - Zope (AT) zope (DOT) org
** No cross posts or HTML encoding! **
(Related lists -
)
simonmichael | Sun, 04 May 2008 11:12:00 GMT |
ZWiki Warning: unicode() LookupError for encoding , WikiNames
will not use the system locale
, I didn't get it quite right. You won't see that, but hopefully you
can see how to tweak the code to find out the encoding it's attempting
to use.
Zope maillist - Zope (AT) zope (DOT) org
** No cross posts or HTML encoding! **
(Related lists -
)
simonmichael | Sun, 04 May 2008 11:12:00 GMT |