Skip to content
This repository was archived by the owner on Jul 11, 2024. It is now read-only.
This repository was archived by the owner on Jul 11, 2024. It is now read-only.

SyntaxError: invalid syntax  #10

Description

@clach04

setup.py documents python 2 and 3 support:

Change 8691814 introduces F strings which are a python 3.6+ specific feature

This breaks support for older python versions, including 3.5.3 (which is the current latest version available for Raspberry Pi's Raspbian).

Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyPDF3 import PdfFileReader
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/py/ebook_rename/py35env/lib/python3.5/site-packages/PyPDF3/__init__.py", line 1, in <module>
    from .pdf import PdfFileReader, PdfFileWriter
  File "/root/py/ebook_rename/py35env/lib/python3.5/site-packages/PyPDF3/pdf.py", line 66, in <module>
    from .generic import *
  File "/root/py/ebook_rename/py35env/lib/python3.5/site-packages/PyPDF3/generic.py", line 494
    return NameObject(f"{ss[0]}+{''.join([f'#{c:X}' for c in ss[1].encode()])}")
                                                                              ^
SyntaxError: invalid syntax

Is this a bug or expected? Readme/setup.py would benefit from a update if the later.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions