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.

SyntaxError - line 695 of createpdf.py

See original GitHub issue

New user here, just did a sudo pip3 install rst2pdf, and tried to create the rst-cheatsheet from https://github.com/ralsina/rst-cheatsheet, and got this error:

$ rst2pdf rst-cheatsheet.rst -s cheatsheet
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/rst2pdf", line 7, in <module>
    from rst2pdf.createpdf import main
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/rst2pdf/createpdf.py", line 695
    except ValueError, v:
                     ^
SyntaxError: invalid syntax

This is on MacOS 10.12, but googling showed a windows user on StackOverflow with the same issue:

http://stackoverflow.com/questions/40305369/i-get-syntaxerror-for-rst2pdf-command-after-installing-rst2pdf-in-windows-7

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
holdenwebcommented, Dec 7, 2017

This is at best a workaround. If someone competent (i.e., not me) wants to fix this with real Python 3 support I will happily donate a copy of “Python in a Nutshell” (for which I wrote the chapter on migration and coexistence) as a combination of inducement and reward.

1reaction
akrabatcommented, Apr 18, 2018

As of today, rst2pdf is a Python 2 project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Status of python3 support · Issue #796 · rst2pdf ... - GitHub
My question is what is the status of the Python 3 support. Does the code in github works ... line 695 except ValueError,...
Read more >
I get "SyntaxError" for rst2pdf command after installing ...
I installed rst2pdf V.93 using PIP and have set the path to scripts in python directory. Here is the error: c:>rst2pdf Traceback (most...
Read more >
Can't run python app on digitalocean after adii...anycodings
I have added flask_swagger_ui in my app. In anycodings_digital-ocean Pycharm everything works good. After anycodings_digital-ocean uploading ...
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