"rlwriter.warning >> invalid image url" (no images in PDF)

71 views
Skip to first unread message

zencoder

unread,
May 19, 2009, 10:45:48 AM5/19/09
to mwlib
On Windows, MediaWiki 1.13.2, I just upgraded from:

mwlib-0.8.5.dev-py2.5-win32 --> mwlib-0.11.3.dev-py2.5-win32

and

mwlib.rl-0.8.2-py2.5 --> mwlib.rl-0.11.3-py2.5

Now I receive this warning in mw-render.log:
2009-05-19T15:33:08 rlwriter.warning >> invalid image url (obj.target:
u'Image:Hand.pen.jpg')

And no images in the PDF output. Any idea?

Johannes Beigel

unread,
May 26, 2009, 9:34:15 AM5/26/09
to mw...@googlegroups.com
On 19.05.2009, at 16:45, zencoder wrote:
> Now I receive this warning in mw-render.log:
> 2009-05-19T15:33:08 rlwriter.warning >> invalid image url (obj.target:
> u'Image:Hand.pen.jpg')
>
> And no images in the PDF output. Any idea?

Can you post the URL of the wiki where it fails?

-- Johannes

zencoder

unread,
Jun 9, 2009, 8:08:44 AM6/9/09
to mwlib
> Can you post theURLof the wiki where it fails?

yes but it's not a public wiki:

http://itd-dss/wiki/index.php/Front-Office_and_Back-Office_paradigm

In the source code of this page you find:

<a href="/wiki/index.php/Image:Archi1.png" class="image"
title="Image:Archi1.png"><img alt="Image:Archi1.png" src="/wiki/images/
7/7f/Archi1.png" width="335" height="353" border="0" /></a>

In the cache directory, the collection.zip contains an "images" folder
with a single empty file called "File".

I tried with MediaWiki 1.13.2, 1.14.0 and 1.15rc1 and with the latest
developer versions of mwlib and the Collection extension.

zencoder

unread,
Jun 9, 2009, 10:22:15 AM6/9/09
to mwlib
Doing some debugging in fetch.py, I get this output:

1% creating nuwiki in 'tmpe70-ge\\nuwiki'
title= 'File:Archi1.png'
thumburl= '/wiki/images/7/7f/Archi1.png'
thumburl= 'http://svdapp07/wiki/images/7/7f/Archi1.png'
imagepath= 'C:\\usr\\tmp\\tmpe70-ge\\nuwiki\\images\\File:Archi1.png'

The problem is that - under Windows - you can't have a file named
'File:Archi1.png', the result is an empty file called 'File'.

zencoder

unread,
Jun 9, 2009, 11:28:19 AM6/9/09
to mwlib
I finally got it to work.

mwlib tries to write files that contain a colon ("File:Archi1.gif"),
this does not work under Windows.
So I added this:

utils.py, Line 85: (fsescape)

elif c==58: # ord(":")==58
res.append("-")

After that, you will find out that os.symlink( ) is not supported
under Windows, so I changed this:

nuwiki.py, Line 147:
#os.symlink(os.path.join("..", utils.fsescape(fqname)), safe_path)
shutil.copy(p, safe_path)

I don't know python, so use at your own risk ;-)

Ralf Schmitt

unread,
Jun 9, 2009, 3:24:01 PM6/9/09
to mw...@googlegroups.com
On Tue, Jun 9, 2009 at 5:28 PM, zencoder<dos....@gmail.com> wrote:
>
> I finally got it to work.
>
> mwlib tries to write files that contain a colon ("File:Archi1.gif"),
> this does not work under Windows.
> So I added this:
>
> utils.py, Line 85: (fsescape)
>
>  elif c==58: # ord(":")==58
>             res.append("-")

this will break handling of existing zipfiles.

why not use cygwin?

- Ralf

Reply all
Reply to author
Forward
0 new messages