AttributeError: 'NoneType' object has no attribute 'record'
See original GitHub issueCuPy Version : 7.3.0 CUDA Root : /usr/local/cuda CUDA Build Version : 10020 CUDA Driver Version : 10020 CUDA Runtime Version : 10020 cuBLAS Version : 10202 cuFFT Version : 10102 cuRAND Version : 10102 cuSOLVER Version : (10, 3, 0) cuSPARSE Version : 10301 NVRTC Version : (10, 2) cuDNN Build Version : 7605 cuDNN Version : 7605 NCCL Build Version : 2406 NCCL Runtime Version : 2507
If I try to run the following command, I get the following error.
cp.asarray(z[cp.newaxis, :, :])
Traceback (most recent call last):
File "kalman.py", line 125, in <module>
z = cp.asarray(z[cp.newaxis, :, :])
File "/home/belt/anaconda3/envs/cusignal/lib/python3.8/site-packages/cupy/creation/from_data.py", line 68, in asarray
return core.array(a, dtype, False, order)
File "cupy/core/core.pyx", line 1785, in cupy.core.core.array
File "cupy/core/core.pyx", line 1862, in cupy.core.core.array
File "cupy/core/core.pyx", line 1950, in cupy.core.core._send_object_to_gpu
AttributeError: 'NoneType' object has no attribute 'record'
What’s interesting is that it only happens after a run a CuPy kernel. One which doesn’t even access variable z.
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (22 by maintainers)
Top Results From Across the Web
Why do I get AttributeError: 'NoneType' object has no attribute ...
NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None .
Read more >[FIXED] AttributeError: 'NoneType' object has no attribute ...
Hence, AttributeError: 'NoneType' object has no attribute 'something' error occurs when the type of object you are referencing is None.
Read more >AttributeError: 'NoneType' object has no attribute '_name' | Odoo
Hello,. I am a French student. I want test mymod, for workflow. But I have this error : AttributeError: 'NoneType' object has no...
Read more >How to fix AttributeError: 'NoneType' object has no attribute 'get'
AttributeError means that there was an Error that had to do with an Attribute request. In general, when you write x.y, y is...
Read more >'NoneType' object has no attribute '_inc_path' - Google Groups
Basically I am getting this error. AttributeError at /admin/pages/new/wagtail_articles/articleindex/3/ 'NoneType' object has no attribute '_inc_path'
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I mean CuPy’s
Stream
objects at the following lines:https://github.com/mnicely/cusignal/blob/a366bb66fb56357d98e77276ba9d031c347febb8/python/cusignal/estimation/filters.py#L150
https://github.com/mnicely/cusignal/blob/a366bb66fb56357d98e77276ba9d031c347febb8/python/cusignal/estimation/filters.py#L160
but, sorry, I misunderstood that these objects are actually referenced by
_cupy_predict_wrapper
and_cupy_update_wrapper
so it’s not the cause.The actual cause is that, in a previous loop, a
KalmanFilter
instance’s CuPyStream
is left beinguse
d and, in the next loop, it is collected when anotherKalmanFilter
instance is assigned, eventually the CuPy current stream becomesNone
with a dead weak reference.I’ve confirmed that
with
statement for temporaryStream
use eliminates the error:@takagi I believe I made the appropriate changes. Can you try now?