[Rivet] Installation of Rivet in my home

Andy Buckley andy.buckley at ed.ac.uk
Thu Apr 29 23:20:24 BST 2010


On 29/04/10 18:01, Flavia Dias wrote:
> Hello all,
> 
> I am trying to install Rivet in my home area, so I can change some
> details in the script of compare-histos and make-plots.
> 
> However, when I follow the instructions and use the rivet-bootsrap
> script, after all the process of installing it, and after I set up my
> environment variables using the rivetenv.sh that it writes, it gives me
> the following error in the compare-histos command:
> 
> (I was running rivet --help, compare-histos --help and make-plots --help
> only to see if they were working):
> 
> 
> [user at local RIVET]$ compare-histos --help
> 
> Traceback (most recent call last):
>  File "/home/fladias/RIVET/bin/compare-histos", line 24, in ?
>     from lighthisto import Histo, PlotParser
>  File "/home/fladias/RIVET/lib64/python2.3/site-packages/lighthisto.py",
> line 18
>     for code,name in codepoint2name.iteritems()
>       ^
> SyntaxError: invalid syntax

Hi Flavia,

I don't know why this only showed up when you installed to your home
directory... is this the first time you ran with Python 2.3?

As the error message indicates, it's not a problem with any of the
compiled bits like Boost, FastJet, etc. ... just a Python syntax error.
I suspect that it's actually valid Python for versions > 2.3, hence we
didn't notice before. To try and fix it, can you place line continuation
characters on the ends on lines 17 and 18 in lighthisto.py? I.e.

unichr2entity = dict( (unichr(code), u'&%s;' % name) \
                          for code,name in codepoint2name.iteritems() \
                          if code != 38 ) # exclude "&"

Hope that helps, and thanks for the report.

Andy

-- 
Dr Andy Buckley
SUPA Advanced Research Fellow
Particle Physics Experiment Group, University of Edinburgh


More information about the Rivet mailing list