gcerretani / antenati

Tools to download data from Portale Antenati

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid syntax on line 41

jetmcquack opened this issue · comments

Hi.

i'm running the script on macos 10.13 with latest python3.

when running the command, like:

python3 antenati.py https://www.antenati.san.beniculturali.it/detail-registry/?s_id=35390357

i always get a syntax error like the following:

File "antenati.py", line 41
    raise RuntimeError(f'Cannot get archive ID from {url}')
                                                         ^
SyntaxError: invalid syntax

running the same script from a macos 11.4 works perfectly fine, so i can't figure out what's happening...

f-strings requires Python 3.6. As stated in the readme, I've never tested this program with an older version of Python 3. Probably your macOS 10.13 comes with an older Python 3.

The f-string is the only Python 3.6 feature currently used. If you replace all f-string instances with the old str.format(), the code should be compliant at least with Python 3.5.