bbprofiler fails due to __future__ import
GretaCB opened this issue Β· comments
Hello π ,
I installed buildbot-profiler and gave it a first try today. When running bbprofiler
, I hit the following error:
~/dev/$ bbprofiler
Traceback (most recent call last):
File "/home/ci/.local/bin/bbprofiler", line 6, in <module>
from buildbot_profiler.app import main
File "/home/ci/.local/lib/python3.5/site-packages/buildbot_profiler/app.py", line 4
from __future__ import print_function
^
SyntaxError: from __future__ imports must occur at the beginning of the file
So I moved the __future__ imports
line to the top of the app.py
file, and the profiler ran fine π .
Looking at the commit history, looks like this bug snuck in via the following commit: 6cfa72e#diff-302462ca31883e37cfbc2956b8df9e06
Env info in case relevant
- buildbot_profiler-1.2.2
- buildbot 2.4.0
- python 3.5
- Ubuntu 16.04
Thanks for your work on this awesome profiler!
Same here:
$ bbprofiler
Traceback (most recent call last):
File "/opt/buildbot/bin/bbprofiler", line 5, in <module>
from buildbot_profiler.app import main
File "/opt/buildbot/lib/python3.11/site-packages/buildbot_profiler/app.py", line 4
from __future__ import print_function
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: from __future__ imports must occur at the beginning of the file