question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
  • 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
takluyvercommented, Nov 23, 2019

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?

0reactions
s-sajid-alicommented, 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]$                                                                                                                                                                             
Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'numpy.dtype' object has no attribute 'is_floating'
I got that reason of the error which indicates “if not is_floating” for the raising the exception. To solve the error, it needs...
Read more >
AttributeError: 'numpy.dtype' object has no attribute 'base_dtype'
Dear all, just a very small question: The following code gives an arror AttributeError: 'numpy.dtype' object has no attribute 'base_dtype', ...
Read more >
NumPy User Guide
an object describing the type of the elements in the array. ... AttributeError: 'numpy.ndarray' object has no attribute 'names'.
Read more >
Structured arrays — NumPy v1.24 Manual
Both the names and fields attributes will equal None for unstructured arrays. The recommended way to test if a dtype is structured is...
Read more >
numpy.dtype — NumPy v1.24 Manual
Create a data type object. A numpy array is homogeneous, and contains elements described by a dtype object. A dtype object can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found