[Moin-user] error when installing packages with attachments that contain special characters in their name

Michael Decker m.decker at fz-juelich.de
Thu Jan 12 12:08:10 EST 2012


Hi everyone,

I just noticed that I get an error when trying to install a package
which contains attachments with special characters in their name (like
"ä" or "ß"), the server fails with return code 500.
The relevant part from the apache error.log is
--------------
[Thu Jan 12 17:52:55 2012] [error] Traceback (most recent call last):
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/wsgiapp.py", line 282, in
__call__
[Thu Jan 12 17:52:55 2012] [error]     response = run(context)
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/wsgiapp.py", line 88, in run
[Thu Jan 12 17:52:55 2012] [error]     response = dispatch(request,
context, action_name)
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/wsgiapp.py", line 136, in
dispatch
[Thu Jan 12 17:52:55 2012] [error]     response = handle_action(context,
pagename, action_name)
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/wsgiapp.py", line 195, in
handle_action
[Thu Jan 12 17:52:55 2012] [error]     handler(context.page.page_name,
context)
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/action/AttachFile.py", line
520, in execute
[Thu Jan 12 17:52:55 2012] [error]     msg = handler(pagename, request)
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/action/AttachFile.py", line
889, in _do_install
[Thu Jan 12 17:52:55 2012] [error]     if package.installPackage():
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/packages.py", line 477, in
installPackage
[Thu Jan 12 17:52:55 2012] [error]     return self.runScript(commands)
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/packages.py", line 446, in
runScript
[Thu Jan 12 17:52:55 2012] [error]     fn(*elements[1:])
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/site-packages/MoinMoin/packages.py", line 139, in
do_addattachment
[Thu Jan 12 17:52:55 2012] [error]     if not os.path.exists(target):
[Thu Jan 12 17:52:55 2012] [error]   File
"/usr/lib/python2.5/posixpath.py", line 171, in exists
[Thu Jan 12 17:52:55 2012] [error]     st = os.stat(path)
----------------------

I have tried to debug this and took a look at the code in packages.py.
When I run (what I believe to be) the exact same commands on an
interactive python shell - even when using the MOIN_PACKAGE file as
input for the attachment filename - the os.path.exists() call just works
as expected. I just updated to the latest 1.9 devel version available
via hg but I still get the same error.

The following actions reproduce the error on my system:
- Upload an attachment with special character in the name to a Page (for
example WikiSandBox).
- Select the package pages option
- package WikiSandBox (WITH attachments)
- move the WikiSandBox page out of the way
- upload package to the wiki
- click install

Any ideas? So far I was unable to find any such bug filed at moinmo.in


Some System Info:
- Debian Stable
- Apache 2.2 with mod_wsgi
- python 2.5
- moin 1.9.3 (latest from hg)

Cheers,
Michael

------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4666 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/moin-user/attachments/20120112/d211e595/attachment.bin>


More information about the Moin-user mailing list