[moin-user] moin-user Digest, Vol 35, Issue 2

mariusz sapinski mariusz.sapinski at gmail.com
Tue Jan 21 03:18:29 EST 2020


Hello,

The source of the bug was an attachment (file) with umlaut in the file
type. Strangely enough on old laptop with Fedora 30 I have not had this
problem.
However now I'l trying to do 'export dump' and have another issue:

Traceback (most recent call last):
  File "/usr/bin/moin", line 5, in <module>
    run()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/moin.py", line 15,
in run
    MoinScript().run(showtime=0)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/__init__.py", line
138, in run
    self.mainloop()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/__init__.py", line
266, in mainloop
    plugin_class(args[2:], self.options).run() # all starts again there
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/__init__.py", line
138, in run
    self.mainloop()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/export/dump.py",
line 207, in mainloop
    for line in log:
  File "/usr/lib/python2.7/dist-packages/MoinMoin/logfile/__init__.py",
line 303, in next
    result = self.__next()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/logfile/__init__.py",
line 290, in __next
    result = self.parser(self.__buffer.lines[self.__rel_index])
  File "/usr/lib/python2.7/dist-packages/MoinMoin/logfile/editlog.py", line
226, in parser
    result.ed_time_usecs = long(result.ed_time_usecs or '0') # has to be
long for py 2.2.x
UnicodeEncodeError: 'decimal' codec can't encode characters in position
0-93: invalid decimal Unicode string.

Problem looks similar but now I have no idea what is wrong (no more
umlauts).

Mariusz



On Sat, Jan 11, 2020 at 10:10 PM mariusz sapinski <
mariusz.sapinski at gmail.com> wrote:

>
>
> On Sat, Jan 11, 2020 at 6:00 PM <moin-user-request at python.org> wrote:
>
>> Send moin-user mailing list submissions to
>>         moin-user at python.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         https://mail.python.org/mailman/listinfo/moin-user
>> or, via email, send a message with subject or body 'help' to
>>         moin-user-request at python.org
>>
>> You can reach the person managing the list at
>>         moin-user-owner at python.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of moin-user digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: export to html (Paul Boddie)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Sat, 11 Jan 2020 17:35:41 +0100
>> From: Paul Boddie <paul at boddie.org.uk>
>> To: moin-user at python.org
>> Subject: Re: [moin-user] export to html
>> Message-ID: <4889514.M4VKbbFhCB at jeremy>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> On Friday 10. January 2020 11.50.31 mariusz sapinski wrote:
>> > Hello,
>> >
>> > I run a standalone wiki (moin 1.9.9) and I have just moved it to another
>> > ubuntu computer. All looks fine except that the command:
>> >
>> > moin --config-dir=/home/me/wiki/config
>> --wiki-url=localhost:8080/Machines/
>> > export dump --page=HEST --target-dir=/home/me/HEST/html
>> >
>> > gives now this error:
>>
>> [...]
>>
>> >   File
>> "/usr/lib/python2.7/dist-packages/MoinMoin/script/export/dump.py",
>> > line 100, in _attachment
>> >     script.log('Writing "%s" attachment "%s"...' % (pagename, filename))
>> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6:
>> > ordinal not in range(128)
>> >
>> >   There seems to be nothing wrong on the page where the script stops. Do
>> > you have any suggestions - what should I look at?
>>
>> Although the error occurs when dumping an attachment, it appears that the
>> error actually occurs when writing to the activity log (which is probably
>> just
>> output to the screen).
>>
>>
> The last page being exported does not even contain any attachment.
>
>
>
>> I would guess here that the pagename is Unicode and cannot be converted
>> to a
>> string, which might be demanded when the text is written to the screen.
>>
>> What locale settings are you using? If you have LC_CTYPE as something
>> like
>> "en_GB.ASCII" then it is quite easy to get such errors when attempting to
>> output Unicode.
>>
>
> Hm. My environmental variable
> LANG is en-US.UTF-8
> LC_CTYPE is empty
> I have tried:
> export LC_CTYPE=$LANG
> but the error is still there.
>
> Cheers,
>
>    Mariusz
>
>
>
>
>>
>> Paul
>>
>> P.S. Another year begins with a reminder that I should perhaps get round
>> to
>> releasing my Moin parser and serialiser tools that dump wiki content in a
>> slightly more reliable way than "moin export dump"...
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> moin-user mailing list
>> moin-user at python.org
>> https://mail.python.org/mailman/listinfo/moin-user
>>
>>
>> ------------------------------
>>
>> End of moin-user Digest, Vol 35, Issue 2
>> ****************************************
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20200121/f1d1ec49/attachment.html>


More information about the moin-user mailing list