Good catch! It seems like we have 3.5.3 on Toolforge.  Being a light user of pip, I have no clue how to force installation of an earlier version of the python module. Any advice on that?

On Tue, Jul 30, 2019 at 9:06 PM Chico Venancio <> wrote:
It seems you are using f strings, this requires python 3.6 or greater. You can check what python is available in Toolforge and use a suitable version for your environment or change the module to be compatible with earlier versions. 


Chico Venancio

Em ter, 30 de jul de 2019 21:55, Huji Lee <> escreveu:
Hi all,

I am trying to run a pywikibot script on the Cloud servers. Please find the script at [1]. The script depends on a few pip packages include cidr_trie. I created a virtual environment under my tools account and installed these dependencies using "pip3 install ..." commands. When I ran the bot, I got a Syntax Error message for the cidr_trie module. I have pasted the traceback below.

Any idea why this is happening? Of note, the exact same version of this module (3.1.2) works without any issues on my local machine.

(venv) tools.huji@tools-sgebastion-07:~$ python3 core/ findproxy
Traceback (most recent call last):
  File "core/", line 250, in <module>
    if not main():
  File "core/", line 243, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "core/", line 95, in run_python_file
  File "core/scripts/userscripts/", line 26, in <module>
    from cidr_trie import PatriciaTrie
  File "/mnt/nfs/labstore-secondary-tools-project/huji/venv/lib/python3.5/site-packages/cidr_trie/", line 49
    return f"IP: {self.ip}, Decision bit: {self.bit}"
SyntaxError: invalid syntax
CRITICAL: Exiting due to uncaught exception <class 'SyntaxError'>


Wikimedia Cloud Services mailing list (formerly
Wikimedia Cloud Services mailing list (formerly