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

AttributeError: 'numpy.dtype' object has no attribute 'typeobj' #1436

Closed
s-sajid-ali opened this issue Nov 20, 2019 · 6 comments · May be fixed by #1439
Closed

AttributeError: 'numpy.dtype' object has no attribute 'typeobj' #1436

s-sajid-ali opened this issue Nov 20, 2019 · 6 comments · May be fixed by #1439

Comments

@s-sajid-ali
Copy link
Contributor

s-sajid-ali commented Nov 20, 2019

  • Operating System : CentOS 8
  • Python version : 3.6.3
  • Where Python was acquired : Miniconda
  • h5py version : git-master
  • HDF5 version : 1.10.5
  • The full traceback/stack trace shown
(ipy3) [sajid@xrmlite h5py]$ module list

Currently Loaded Modules:
  1) numactl-2.0.12-gcc-9.2.0-3si37vi        4) xz-5.2.4-gcc-9.2.0-6eztfe7        7) hwloc-1.11.11-gcc-9.2.0-4e4okzw  10) gcc-9.2.0-gcc-8.2.1-yaowtaf
  2) libpciaccess-0.13.5-gcc-9.2.0-uxvf7n7   5) zlib-1.2.11-gcc-9.2.0-srvzytv     8) openmpi-4.0.2-gcc-9.2.0-bxos5zu
  3) libiconv-1.16-gcc-9.2.0-std2asg         6) libxml2-2.9.9-gcc-9.2.0-pporwgg   9) hdf5-1.10.5-gcc-9.2.0-p6eqcpx



(ipy3) [sajid@xrmlite h5py]$ python setup.py configure --mpi --hdf5=$(spack location -i hdf5) &> config_log
(ipy3) [sajid@xrmlite h5py]$ python setup.py build &> build_log
(ipy3) [sajid@xrmlite h5py]$ python setup.py install &> install_log
(ipy3) [sajid@xrmlite h5py]$ cd ../
(ipy3) [sajid@xrmlite packages]$ ipython
impPython 3.6.3 |Intel Corporation| (default, May  4 2018, 04:22:28)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.3.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import h5py
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-c9f0b8c65221> in <module>()
----> 1 import h5py

~/miniconda3/envs/ipy3/lib/python3.6/site-packages/h5py-2.10.0-py3.6-linux-x86_64.egg/h5py/__init__.py in <module>()
     42 _errors.silence_errors()
     43
---> 44 from ._conv import register_converters as _register_converters
     45 _register_converters()
     46

h5py/h5t.pxd in init h5py._conv()

h5py/h5t.pyx in init h5py.h5t()

h5py/h5t.pyx in h5py.h5t._get_available_ftypes()

AttributeError: 'numpy.dtype' object has no attribute 'typeobj'

In [2]:
Do you really want to exit ([y]/n)? y
(ipy3) [sajid@xrmlite packages]$

Configure, build and install log files are available here.

EDIT : I switched to release-2.10.0 and everything works fine. I'll leave this here as a bug report but I don't require this to be solved anytime soon.

@takluyver
Copy link
Member

Do you know what version of numpy you had installed along with this?

@kif could this be related to the cleanup of numpy in the Cython code?

@s-sajid-ali
Copy link
Contributor Author

s-sajid-ali commented Nov 23, 2019

Do you know what version of numpy you had installed along with this?

The numpy version it picked up is 1.17.3 as per the install_log file I linked to in the previous post.

@kif
Copy link
Contributor

kif commented Nov 24, 2019 via email

@takluyver
Copy link
Member

Thanks Jerome :-)

@kif
Copy link
Contributor

kif commented Nov 25, 2019

I agree, this definitely looks like smth I changed recently :)

So you repoted the bug on Python3.6, built with openmpi and gcc9.2 against HDF5-1.10.5.
I tested on Python3.7, openmpi (3.1.3-11), gcc 8.2, HDF5-1.10.4 and it works for me :(

Beside this, I guess the bug is clearly located in h5t line 245-250, but I find it frustrating not being able to test the changes. Will you be able to validate a patch on you system ?

@s-sajid-ali
Copy link
Contributor Author

s-sajid-ali commented Nov 27, 2019

I'm not sure what happened then but I'm unable to reproduce this now. I didn't save my conda env file so I can't say where the other packages in the env came from but git-master now builds correctly with a fresh conda env. Apologies for the inconvenience.

Could this error have something to do with a conda env where numpy and numpy base are from two different repositories like this ?

(ipy3) [sajid@xrmlite packages]$ conda list | grep numpy                  
numpy                     1.17.3                   pypi_0    pypi             
numpy-base                1.17.0                  py36_13    intel                                                                                                     (ipy3) [sajid@xrmlite packages]$                                                                                                                                                                             

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

Successfully merging a pull request may close this issue.

3 participants