YosysHQ / sby

SymbiYosys (sby) -- Front-end for Yosys-based formal verification flows
Other
388 stars 73 forks source link

Error when running command `sby` #225

Closed Wlfc912 closed 1 year ago

Wlfc912 commented 1 year ago

I've followed the installation guide to install all the necessary packages. But when I run the sby command - either sby fifo.sby as in the tutorial or just sby, I would get an error:

Traceback (most recent call last):
  File "/usr/local/bin/sby", line 23, in <module>
    from sby_jobserver import SbyJobClient, process_jobserver_environment
  File "<fstring>", line 1
    (self.is_ready=)
                  ^
SyntaxError: invalid syntax

In the tutorial, it says if sby doesn't work then there must be a problem with the sby installation. But what problem exactly? I've googled a lot, and also tried installing OSS CAD Suite, but none of them helps. Could anyone help identify the cause of this error?

jix commented 1 year ago

The error is due to the used Python version being too old. That syntax was introduced with Python 3.8, which is also the version that is included in the OSS CAD Suite, so that error should not appear when running the included SBY. Updating Python should fix this for a manually installed SBY.

In this particular instance, it's easy to change the code to also be compatible with Python 3.6 or newer (in fact removing both trailing = is sufficient although that slightly changes the debug output), and I can commit a change for that tomorrow. In general I'd recommend using Python 3.8 or newer though, as that is the oldest version for which the test suite is run automatically.

jix commented 1 year ago

I just merged a PR that resolves this Python 3.6 incompatibility (but have not checked for any other possible incompatibilities). I still recommend using at least Python 3.8 and we are planning to update the installation guide to reflect this.

Wlfc912 commented 1 year ago

Thank you so much for the help, it works now!