Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Error using python2.4 - easy fix provided #42

Closed
dopplershift opened this issue Feb 26, 2014 · 1 comment
Closed

Import Error using python2.4 - easy fix provided #42

dopplershift opened this issue Feb 26, 2014 · 1 comment

Comments

@dopplershift
Copy link
Member

From SamHi...@gmail.com on March 17, 2010 16:34:54

What steps will reproduce the problem? 1. Install netCDF4-0.9-py2.4-linux-i686.egg using easy_install
2. Try importing netCDF4 (in python2.4) What is the expected output? What do you see instead? File
"/var/www/django/dgw-wsgi/python_modules/lib/python2.4/site-packages/netCDF4-0.9-py2.4-linux-i686.egg/netCDF4_utils.py",
line 424
key = reversed(self).next() if last else iter(self).next()
^
SyntaxError: invalid syntax What version of the product are you using? On what operating system? RedHat Linux, python2.4, netCDF4-0.9-py2.4-linux-i686 Please provide any additional information below. Inline conditional statements aren't supported in python 2.4.

Simply changing line 424 to:
if last: key = reversed(self).next()
else: key = iter(self).next()
fixed the problem.

Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=42

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on March 17, 2010 16:13:58

Thanks - this was actually already fixed in SVN.

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant