Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 307353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:33:03+00:00 2026-05-12T07:33:03+00:00

I want to generate HTML pages with rst2html, using my own templates. these templates

  • 0

I want to generate HTML pages with rst2html, using my own templates. these templates include many % signs, like in

<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">

now, when I call rst2html using the command

rst2html --template=layout2.tpl rst/index.rst > index.html

i get the error

ValueError: unsupported format character ‘”‘ (0x22) at index 827

i found out the problem is that rst2html thinks that the %” is a placeholder.

i already tried escaping the % in the template, like

<TABLE border="0" cellpadding="0" cellspacing="0" width="100\%">

but this is not working, the error is the same.

so my question is how i can solve this issue. any help is greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:33:04+00:00Added an answer on May 12, 2026 at 7:33 am

    Have you tried obvious things: escaping the ‘%’ with ‘%’?

    Here is normal string formatting to display a percent sign in the result:

    >>> print "%d%%" % 100
    100%
    

    Maybe rst2html is the same? (I haven’t tried this in rst2html — I don’t have it installed.)

    Okay, now I’ve installed docutils. This works for me:

    layout2.tpl:

    <TABLE border="0" cellpadding="0" cellspacing="0" width="100%%">
    

    Command line:

    C:\Python26\Lib\site-packages>python C:\Python26\Lib\site-packages\docutils-0.5-
    py2.6.egg\EGG-INFO\scripts\rst2html.py --template=c:\temp\layout2.tpl
    ^Z
    <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
    

    So the result is as desired, I believe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know how to generate html documentation using Sandcastle and similar tools. But if
I am using DD_roundies to generate rounded corners in Internet Explorer. The pages that
This is my current problem. I want to generate a HTML page, which contains
Greetings, I'm using PISA to generate some nice pdf of my web pages. Anyway
I generate a HTML page with VB.Net which stores several pinks to files. These
<sc:Image> and <sc:FieldRenderer> , when rendering a MediaItem, generate html code that looks like
I have a website running on a google app engine. Like any website these
Recently I needed to generate a huge HTML page containing a report with several
I've got an HTML-only website (with a bit of inconsequential javascript). The static pages
By default I see that Sandcastle is generating HTML pages and links named with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.