question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

generating pdf for pywinauto fails while html output is OK

See original GitHub issue

I’m trying to generate pdf documentation for the pywinauto project (Win8.1 x64). conf.py is updated according to the Handbook (18). Steps to reproduce:

  1. Get pywinauto sources
  2. Install Sphinx and rst2pdf by pip.
  3. Run sphinx-build -w warnings.txt -E -b pdf .\doc_src .\pdf_docs 1>sphinx_build_log.txt 2>stderr.txt in the pywinauto repo root folder.

Output:

[ERROR] pdfbuilder.py:130 format not resolved, probably missing URL scheme or undefined destination target for 'module-pywinauto.actionlogger'
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\rst2pdf\pdfbuilder.py", line 127, in write
    docwriter.write(doctree, destination)
  File "C:\Python27\lib\site-packages\docutils\writers\__init__.py", line 80, in write
    self.translate()
  File "C:\Python27\lib\site-packages\rst2pdf\pdfbuilder.py", line 621, in translate
    compressed=self.compressed)
  File "C:\Python27\lib\site-packages\rst2pdf\createpdf.py", line 653, in createPdf
    pdfdoc.multiBuild(elements)
  File "C:\Python27\lib\site-packages\reportlab\platypus\doctemplate.py", line 1024, in multiBuild
    self.canv.save()
  File "C:\Python27\lib\site-packages\reportlab\pdfgen\canvas.py", line 1215, in save
    self._doc.SaveToFile(self._filename, self)
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 219, in SaveToFile
    data = self.GetPDFData(canvas)
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 244, in GetPDFData
    return self.format()
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 424, in format
    IOf = IO.format(self)
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 869, in format
    fcontent = format(self.content, document, toplevel=1)   # yes this is at top level
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 80, in format
    f = element.format(document)
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 1606, in format
    return D.format(document)
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 676, in format
    L = [(format(PDFName(k),document)+b" "+format(dict[k],document)) for k in keys]
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 80, in format
    f = element.format(document)
  File "C:\Python27\lib\site-packages\reportlab\pdfbase\pdfdoc.py", line 1782, in format
    if f is None: raise ValueError("format not resolved, probably missing URL scheme or undefined destination target for '%s'" % self.name)
ValueError: format not resolved, probably missing URL scheme or undefined destination target for 'module-pywinauto.actionlogger'

HTML output is OK with the command:

sphinx-build -w warnings.txt -E -b html .\doc_src .\gen_docs 1>sphinx_build_log.txt 2>stderr.txt

87 warnings is not a showstopper for the correct HTML output.

TeX is not installed on the system. I believe it’s not required, right?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
vasily-v-ryabovcommented, Aug 19, 2020

@An0Mee yes, this was resolved a long time ago. PDF docs are available here: https://pywinauto.readthedocs.io/_/downloads/en/latest/pdf/ (from ReadTheDocs page you can scroll down at the left bar and click on “v:latest” link where you will see the menu with “Download PDF” link among others.

0reactions
vasily-v-ryabovcommented, Aug 6, 2022

We used these requirements:

Babel==1.3
mock==2.0.0
rst2pdf
six==1.10.0
Sphinx==1.4.1

and generated pdf for Windows package on Linux machine (Read-the-Docs builds the docs on Linux even if it is Windows only package). This is what I remember in few words. More details can be found here: https://github.com/pywinauto/pywinauto/pull/182.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pywinauto Documentation - Read the Docs
How to use pywinauto with application languages other than English . ... Use utf-8 encoding while writing dump_tree() output to file.
Read more >
Getting Started Guide — pywinauto 0.6.8 documentation
Once you have installed pywinauto - how do you get going? The very first necessary thing is to determine which accessibility technology (pywinauto's...
Read more >
Pywinauto dont response - python - Stack Overflow
First part of program calls pdf a html presentations and add a path to Chrome, second part is calling some Chrome widget for...
Read more >
pywinauto 0.6.5 documentation - 一译
OK # looks first for a dialog with a title like "PageSetup" # then it looks for a control on that dialog with...
Read more >
Release 4.10 David Cortesi - PyInstaller Documentation
If the pip setup fails to build a bootloader, or if you do not ... Standard input and output work as normal through...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found