ulikoehler / UliEngineering

A python library for calculations perfomed in electronics engineering
Apache License 2.0
50 stars 7 forks source link

SyntaxError: invalid syntax EngineerIO.py", line 133 #3

Open carlosgmail opened 5 years ago

carlosgmail commented 5 years ago

Works locally on mac. Gives error below running on IBM Cloud using: python-3.5.6

Requirements.txt Flask==0.10.1 requests==2.12.4 flask-restful-swagger==0.19 flask-restplus==0.9.2 watson-developer-cloud>=1.3.5 python-dotenv==0.8.2 cloudant==2.12.0 UliEngineering==0.3.3 scipy>=0.5 toolz==0.10.0 numpy>=1.5

Error Traceback (most recent call last): File "skill.py", line 16, in <module> from UliEngineering.SignalProcessing.Simulation import sine_wave File "/home/vcap/deps/0/python/lib/python3.5/site-packages/UliEngineering/SignalProcessing/Simulation.py", line 8, in <module> from UliEngineering.EngineerIO import normalize_numeric File "/home/vcap/deps/0/python/lib/python3.5/site-packages/UliEngineering/EngineerIO.py", line 133 self.unit_prefix_re = re.compile(f'({__unitprefix_set})+$') # $: Matched at end of numeric part ^ SyntaxError: invalid syntax

Any ideas how I might be able to fix this?

ulikoehler commented 5 years ago

What's your python version? I believe you are using an older version which does not support f-strings

holgersson32644 commented 3 years ago

Hi, the reporter's second line confirms it: python-3.5.6. f-strings were introduced with python 3.6, so I assume you can close this bug as wontfix.. :-]