[ase-users] namespace collision in io module with Python 2.7
Nichols A. Romero
naromero at alcf.anl.gov
Thu Sep 1 21:45:51 CEST 2011
This is for the gpaw_custom_hdf5 branch. Yes, the test directory has an io directory
which trunk does not have.
Nichols A. Romero, Ph.D.
Argonne Leadership Computing Facility
Argonne National Laboratory
Building 240 Room 2-127
9700 South Cass Avenue
Argonne, IL 60490
(630) 252-3441
----- Original Message -----
From: "Ask Hjorth Larsen" <askhl at fysik.dtu.dk>
To: "Nichols A. Romero" <naromero at alcf.anl.gov>
Cc: "ase-users" <ase-users at listserv.fysik.dtu.dk>
Sent: Thursday, September 1, 2011 2:39:46 PM
Subject: Re: [ase-users] namespace collision in io module with Python 2.7
Hi
On Thu, 1 Sep 2011, Nichols A. Romero wrote:
> I have Python 2.7 and the SVN version of ASE & GPAW. I think this is a namespace
> collision between the io module in ASE and the io module in Python 2.7.
>
> [naromero:~/gpaw_custom_hdf5/gpaw/test] naromero% python2.7 ./test.py
> Traceback (most recent call last):
> File "./test.py", line 11, in <module>
> import gpaw.mpi as mpi
> File "/Users/naromero/gpaw_custom_hdf5/gpaw/__init__.py", line 211, in <module>
> from gpaw.aseinterface import GPAW
> File "/Users/naromero/gpaw_custom_hdf5/gpaw/aseinterface.py", line 9, in <module>
> from ase.units import Bohr, Hartree
> File "/Users/naromero/ase/ase/__init__.py", line 16, in <module>
> from ase.io import read, write
> File "/Users/naromero/ase/ase/io/__init__.py", line 5, in <module>
> from zipfile import is_zipfile
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 462, in <module>
> class ZipExtFile(io.BufferedIOBase):
> AttributeError: 'module' object has no attribute 'BufferedIOBase'
>
> Is there an easy fix for this?
>
> Nichols A. Romero, Ph.D.
> Argonne Leadership Computing Facility
> Argonne National Laboratory
> Building 240 Room 2-127
> 9700 South Cass Avenue
> Argonne, IL 60490
> (630) 252-3441
Very strange. Is there by any chance a file or directory called 'io.py'
or 'io' in the particular version of gpaw whose test directory you run
this from?
Regards
Ask
More information about the ase-users
mailing list