[Rivet] Installation of Rivet in my home

Eike von Seggern jan.eike.von.seggern at physik.hu-berlin.de
Fri Apr 30 08:38:05 BST 2010


Hi Flavia,

if the suggestion Andy made is not working for you, you can try to
replace lines 17--19 with

unichr2entity = {}
for code, name in codepoint2name.iteritems():
    # exclude "&"
    if code != 38:
        unichr2entity[unichr(code)] = u"&%s;" % (name)

This should work, no matter which version of Python your using.

Cheers,
    eike


On Thu, Apr 29, 2010 at 23:20 +0100, Andy Buckley wrote:
> 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


More information about the Rivet mailing list