I am using Redhawk 1.9. I have created a Redhawk Device from the 1.8.4 IDE.
- 1.8.4 Redhawk Device (created with all default settings)
- C++ implementation
- Import existing project into 1.9 IDE
- I read the Redhawk 1.9 Release notes on how to convert between 1.8.4 and 1.9 projects *http://redhawksdr.github.io/Documentation/Release_Notes_1.9.0.pdf*
I import the default 1.8.4 device into the 1.9 IDE. I am able to run and build the 1.8.4 device in the 1.9 IDE. When I try to regenerate the code for 1.8.4 device, the IDE ask me if I want to upgrade to 1.9. The popup says "ConversionTestDevice uses deprecated code generators. Would you like to upgrade this project?". I decided to do an upgrade. I then get the following error message:
/usr/local/redhawk/core/bin/update_project returned with error code 1
Traceback (most recent call last): File "/usr/local/redhawk/core/bin/update_project", line 222, in ? if check_bulkio_input(compCpp): File "/usr/local/redhawk/core/bin/update_project", line 105, in check_bulkio_input for line in strip_comments(open(filename, 'r')): File "/usr/local/redhawk/core/bin/update_project", line 86, in strip_comments ch += safe_next(chars) File "/usr/local/redhawk/core/bin/update_project", line 56, in safe_next return next(item) NameError: global name 'next' is not defined
I would appreciate suggestions on how to convert 1.8.4 device to 1.9 device.
Based on your error message "NameError: global name 'next' is not defined" and the contents of the 1.9.0 release of update_project python script, I am assuming that you are running a version of python less than 2.6. The next function is a python builtin that was introduced in Python 2.6 (http://docs.python.org/2/library/functions.html#next). This is a known bug in the upgrade script as it should be compatible with Python 2.4 as well as Python 2.6 (The default python installations in CentOS 5 and 6 respectively). To fix this, you may modify the update_project script located in $OSSIEHOME/bin/update_project and define the following function:
You should then remove the previously defined "safe_next" function.
Lastly, you need to replace the two calls to "safe_next" with a call to the newly implement next function and add a second argument of empty string ''
For clarity, a diff of update_project with these changes is below: