ALIGN-analoglayout / ALIGN-public

BSD 3-Clause "New" or "Revised" License
264 stars 66 forks source link

Code error #1302

Closed breeze12380 closed 12 months ago

breeze12380 commented 1 year ago

Installed ALIGN successfully. But when I run 'schematic2layout.py -h', it gives error:

Traceback (most recent call last): File "/general/bin/schematic2layout.py", line 2, in import align File "/ALIGN-public/align/init.py", line 6, in from .main import schematic2layout File "/ALIGN-public/align/main.py", line 11, in from .compiler import generate_hierarchy File "/ALIGN-public/align/compiler/init.py", line 1, in from .compiler import generate_hierarchy, read_lib File "/ALIGN-public/align/compiler/compiler.py", line 4, in from ..schema import SubCircuit, constraint File "/ALIGN-public/align/schema/init.py", line 3, in from .subcircuit import SubCircuit, Circuit File "/ALIGN-public/align/schema/subcircuit.py", line 8, in from .constraint import ConstraintDB File "/ALIGN-public/align/schema/constraint.py", line 758 if value := getattr(cls, attr, False): ^ SyntaxError: invalid syntax

srini229 commented 1 year ago

Can you provide the version of Python and the platform you are trying it on?

breeze12380 commented 1 year ago

Python 3.7.11 and linux. I tried two machines, each with and without virtual env. One attempt yields the error above. Wheel generation failed for other attempts, which seems not uncommon based on other threads. I installed and ran the flow with the example successfully around a year ago. What changes were made? If not, I think the issue results from my updated python version.

srini229 commented 1 year ago

walrus operator (:=) was introduced in Python 3.8. Can you try on Python 3.8 or a later version? We'll update the documentation to reflect this.