Dear Casperites,

I recently started the Introduction to Simulink Roach2 - Casper tutorial and am 
having difficulty importing the required “casperfpga" repository from GitHub. 
After cloning the repo (git clone git://github.com/ska-sa/casperfpga 
<https://github.com/ska-sa/casperfpga>), and while running the standard  “sudo 
python setup.py install” command, I reach the “byte-compiling” printout 
statement of file register.pyc and then receive a syntax error:

byte-compiling /usr/lib/python2.6/site-packages/casperfpga/register.py to 
register.pyc
SyntaxError: ('invalid syntax', 
('/usr/lib/python2.6/site-packages/casperfpga/register.py', 106, 38, '        
new_values = {_field: None for _field in self.field_names()}\n’))


The rest of the install then continues. If I then open python and type “import 
casperfpga”, this syntax error once again appears. Here is the full print-out 
(which also includes the version of python and Red Hat Linux that I’m using):

Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
>>> import casperfpga
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/casperfpga/__init__.py", line 7, in 
<module>
    from dcp_fpga import DcpFpga
  File "/usr/lib/python2.6/site-packages/casperfpga/dcp_fpga.py", line 3, in 
<module>
    from casperfpga import CasperFpga
  File "/usr/lib/python2.6/site-packages/casperfpga/casperfpga.py", line 10, in 
<module>
    import register
  File "/usr/lib/python2.6/site-packages/casperfpga/register.py", line 106
    new_values = {_field: None for _field in self.field_names()}
                                 ^
SyntaxError: invalid syntax


Now, I doubt there actually is a syntax error because the GitHub repo doesn’t 
have any posted issues, so I then assume this is an issue with my own 
environment.  Do any of you either have suggestions on how I should change my 
environment to properly recognize the casperfpga register.py file, or have 
specific recommendations on how to edit the register.py file? 

Best Regards,
Alec

Reply via email to