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

netcdf module : basestring is not available anymore in Python 3 #4514

Closed
julienvienne opened this issue Feb 11, 2015 · 3 comments
Closed

netcdf module : basestring is not available anymore in Python 3 #4514

julienvienne opened this issue Feb 11, 2015 · 3 comments
Labels
maintenance Items related to regular maintenance tasks scipy.io

Comments

@julienvienne
Copy link

Hello,
Using netcdf module with Python 3, I encountered the following trace :

[...]
File "/usr/local/lib/python3.4/site-packages/scipy/io/netcdf.py", line 233, in close
self.flush()
File "/usr/local/lib/python3.4/site-packages/scipy/io/netcdf.py", line 322, in flush
self._write()
File "/usr/local/lib/python3.4/site-packages/scipy/io/netcdf.py", line 334, in _write
self._write_var_array()
File "/usr/local/lib/python3.4/site-packages/scipy/io/netcdf.py", line 380, in _write_var_array
self._write_var_metadata(name)
File "/usr/local/lib/python3.4/site-packages/scipy/io/netcdf.py", line 401, in _write_var_metadata
self._write_att_array(var._attributes)
File "/usr/local/lib/python3.4/site-packages/scipy/io/netcdf.py", line 363, in _write_att_array
self._write_values(values)
File "/usr/local/lib/python3.4/site-packages/scipy/io/netcdf.py", line 475, in _write_values
if isinstance(values, basestring):
NameError: name 'basestring' is not defined

Apparently, 'basestring' type is not used anymore in Python 3.
Here is a tip to avoid the problem : oxplot/fysom#1

Regards,

@pv
Copy link
Member

pv commented Feb 11, 2015 via email

@julienvienne
Copy link
Author

Thank you for your quick answer.
You may be right. I'm using 0.14.0 version.
Regards,

@rgommers rgommers added scipy.io maintenance Items related to regular maintenance tasks labels Oct 24, 2015
@rgommers
Copy link
Member

was indeed fixed, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.io
Projects
None yet
Development

No branches or pull requests

3 participants