SyntaxError f_matrix.py line 519 while installation

50 views
Skip to first unread message

piroyon00

unread,
Apr 11, 2014, 3:34:48 AM4/11/14
to grit...@googlegroups.com
Dear GRIT developer

I installed GRIT 1.1.2 and got an error. 

# python setup.py install

  *snip*

 SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/GRIT-1.1.2-py2.6-linux-x86_64.egg/grit/f_matrix.py', 519, 53, '    read_groups_and_read_lens =  { (RG, read_len) for RG, read_len, bin \n'))

Processing dependencies for GRIT==1.1.2 had no error.
/usr/bin/run_grit.py is built. But I got a same error when I executed example code.

  File "/usr/lib64/python2.6/site-packages/GRIT-1.1.2-py2.6-linux-x86_64.egg/grit/f_matrix.py", line 519
    read_groups_and_read_lens =  { (RG, read_len) for RG, read_len, bin 

$ python --version
Python 2.6.6
$ cat /etc/redhat-release 
CentOS release 6.4 (Final) 

Any suggestions?

Best,
Hiroyo

Nathan Boley

unread,
Apr 11, 2014, 3:41:03 AM4/11/14
to piroyon00, grit...@googlegroups.com
Dear Hiroyo,

> File
> "/usr/lib64/python2.6/site-packages/GRIT-1.1.2-py2.6-linux-x86_64.egg/grit/f_matrix.py",
> line 519
> read_groups_and_read_lens = { (RG, read_len) for RG, read_len, bin

My guess is that it's a python version error. Do you have python2.7?
I'll install 2.6 and try to reproduce.

Best, Nathan

Nathan Boley

unread,
Apr 11, 2014, 3:51:14 AM4/11/14
to piroyon00, grit...@googlegroups.com
Ya, it looks like a 2.6 problem - dictionary comprehensions weren't
introduced until 2.7.

Try replacing

{ (RG, read_len) for RG, read_len, bin
in binned_reads.iterkeys()) }

with

dict((RG, read_len) for RG, read_len, bin in binned_reads.iterkeys())

(although there may be other incompatibilities).

I'll either update the code tomorrow or add a version text. Seeing as
2.7 was released 4 years ago I guess I'm not convinced that it's
important to maintain 2.6 compatibility. Thoughts?

Best, Nathan

piroyon00

unread,
Apr 11, 2014, 4:34:40 AM4/11/14
to grit...@googlegroups.com, piroyon00
Dear Nathan,

Thank you for your quick response. I'll install python 2.7.
Thanks again for your time.
  We replaced our machine at Dec.2013... :(

Best,
Hiroyo
Reply all
Reply to author
Forward
0 new messages