Trouble running DES sample from Python on OS X with XEM6001

I think I finally figured out how to get Python to find the API (by setting the PYTHONPATH system variable and installing the dynamic library), but now I get the error below when I try to run the DESTester.py script.

$ python DESTester.py
------ DES Encrypt/Decrypt Tester in Python ------
Device firmware version: 3.1
Device serial number: 1111000172
Device ID: Opal Kelly XEM6001
FPGA configuration failed.
Usage: DESTester [d|e] key infile outfile
[d|e] - d to decrypt the input file. e to encrypt it.
key - 64-bit hexadecimal string used for the key.
infile - an input file to encrypt/decrypt.
outfile - destination output file.
Traceback (most recent call last):
File “DESTester.py”, line 125, in
strkey = sys.argv[2]
IndexError: list index out of range

This is my first attempt with an OK board. It looks like the hardware is recognized but FPGA configuration fails. I checked to see that the switch on the board was set to “USB configuration”…not sure what to try next…

Any ideas?

The best part about the Python examples is that they are simple scripts and don’t require compilation and the source code is there, so you can easily debug to see where things went wrong.

Please refer to the error messages that the script printed as well as the README.txt file that is in the folder. You did not call the application with any arguments and the script notified you of this and provided proper usage information. Example calling is also in the README.

Also, the configuration file needs to be located in the same folder as the script. You will need to copy it from the appropriate location and rename it destop.bit. This is also mentioned in the README.

Please let us know if this clears things up a bit.

— Begin quote from Opal Kelly Support;3103

Also, the configuration file needs to be located in the same folder as the script. You will need to copy it from the appropriate location and rename it destop.bit. This is also mentioned in the README.

— End quote

This is helpful, but which README are you referring to? There is a README.txt in the Samples directory that says nothing about renaming bit files and I don’t see any README in the Samples/DES/ directory. Maybe I’m just dense and it’s hidden in plain sight, but perhaps you could point me to it.

That’s annoying…there’s a bunch of files in the Windows-installed Samples directory that don’t exist in the Mac OS X disk image…like the README. No wonder I couldn’t find it.

Thanks for pointing that out and sorry for the inconvenience. This will be fixed in the next distribution.