Invalid syntax in 2.27 (latest release)
Bug reports:
Please follow the general troubleshooting steps first:
-
Are you running the latest graph-tool
version? -
Do you observe the problem with the current git version? -
Are you using Macports or Homebrew? -
Did you compile graph-tool
manually? -
If you answered yes above, did you use the exact same compiler to build graph-tool
,boost-python
andPython
?
I get an invalid syntax error upon importing the draw submodule in 2.27. It is, by the way, very weird since I can't spot the error in the source. But Flake8 also spots the error.
All the dependencies and compiler are very up to date as of yesterday (I'm on arch), and I rebuilt graph-tool yesterday night (I was previously on 2.26).
System information
- release: 2.27
- OS: archlinux
- Python: python 3.7.0
- Compiler: gcc 8.2.0
- Boost: 1.67.0-7
- Misc: I'm building graph-tool using the PKGBUILD available on the AUR (with the only difference being that I parallelize the build with -j 4).
Import traceback:
In [1]: import graph_tool as gt
In [2]: import graph_tool.draw
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2961, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-97a173dd2df1>", line 1, in <module>
import graph_tool.draw
File "/usr/lib/python3.7/site-packages/graph_tool/draw/__init__.py", line 875, in <module>
from .cairo_draw import graph_draw, cairo_draw, get_hierarchy_control_points, default_cm
File "/usr/lib/python3.7/site-packages/graph_tool/draw/cairo_draw.py", line 1491, in <module>
from .gtk_draw import *
File "/usr/lib/python3.7/site-packages/graph_tool/draw/gtk_draw.py", line 1185
update_layout=True, async=False, no_main=False, **kwargs):
^
SyntaxError: invalid syntax